57038
|
1 |
Summary: APPLICATION_SUMMARY
|
|
2 |
Name: APPLICATION_PACKAGE
|
|
3 |
Version: APPLICATION_VERSION
|
|
4 |
Release: 1
|
|
5 |
License: APPLICATION_LICENSE_TYPE
|
|
6 |
Vendor: APPLICATION_VENDOR
|
|
7 |
Prefix: INSTALLATION_DIRECTORY
|
|
8 |
Provides: APPLICATION_PACKAGE
|
|
9 |
Autoprov: 0
|
|
10 |
Autoreq: 0
|
|
11 |
PACKAGE_DEPENDENCIES
|
|
12 |
|
|
13 |
#avoid ARCH subfolder
|
|
14 |
%define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
|
|
15 |
|
|
16 |
#comment line below to enable effective jar compression
|
|
17 |
#it could easily get your package size from 40 to 15Mb but
|
|
18 |
#build time will substantially increase and it may require unpack200/system java to install
|
|
19 |
%define __jar_repack %{nil}
|
|
20 |
|
|
21 |
%description
|
|
22 |
APPLICATION_DESCRIPTION
|
|
23 |
|
|
24 |
%prep
|
|
25 |
|
|
26 |
%build
|
|
27 |
|
|
28 |
%install
|
|
29 |
rm -rf %{buildroot}
|
|
30 |
mkdir -p %{buildroot}INSTALLATION_DIRECTORY
|
|
31 |
cp -r %{_sourcedir}/APPLICATION_FS_NAME %{buildroot}INSTALLATION_DIRECTORY
|
|
32 |
|
|
33 |
%files
|
|
34 |
APPLICATION_LICENSE_FILE
|
|
35 |
INSTALLATION_DIRECTORY/APPLICATION_FS_NAME
|
|
36 |
|
|
37 |
%post
|
57150
|
38 |
if [ "RUNTIME_INSTALLER" != "true" ]; then
|
57256
|
39 |
ADD_LAUNCHERS_INSTALL
|
57038
|
40 |
xdg-desktop-menu install --novendor INSTALLATION_DIRECTORY/APPLICATION_FS_NAME/APPLICATION_LAUNCHER_FILENAME.desktop
|
|
41 |
FILE_ASSOCIATION_INSTALL
|
|
42 |
fi
|
|
43 |
|
|
44 |
%preun
|
57150
|
45 |
if [ "RUNTIME_INSTALLER" != "true" ]; then
|
57256
|
46 |
ADD_LAUNCHERS_REMOVE
|
57038
|
47 |
xdg-desktop-menu uninstall --novendor INSTALLATION_DIRECTORY/APPLICATION_FS_NAME/APPLICATION_LAUNCHER_FILENAME.desktop
|
|
48 |
FILE_ASSOCIATION_REMOVE
|
|
49 |
fi
|
|
50 |
if [ "SERVICE_HINT" = "true" ]; then
|
|
51 |
if [ -x "/etc/init.d/APPLICATION_PACKAGE" ]; then
|
|
52 |
if [ "STOP_ON_UNINSTALL" = "true" ]; then
|
|
53 |
/etc/init.d/APPLICATION_PACKAGE stop
|
|
54 |
fi
|
|
55 |
/sbin/chkconfig --del APPLICATION_PACKAGE
|
|
56 |
rm -f /etc/init.d/APPLICATION_PACKAGE
|
|
57 |
fi
|
|
58 |
fi
|
|
59 |
|
|
60 |
%clean
|