author | herrick |
Tue, 24 Sep 2019 13:41:16 -0400 | |
branch | JDK-8200758-branch |
changeset 58301 | e0efb29609bd |
parent 58037 | c127c766fe8e |
child 58417 | 67ffaf3a2b75 |
permissions | -rw-r--r-- |
57038 | 1 |
Summary: APPLICATION_SUMMARY |
2 |
Name: APPLICATION_PACKAGE |
|
3 |
Version: APPLICATION_VERSION |
|
57741
38856ef4a19c
8229138: Add --linux-app-release option for DEB and RPM packages
herrick
parents:
57256
diff
changeset
|
4 |
Release: APPLICATION_RELEASE |
57038 | 5 |
License: APPLICATION_LICENSE_TYPE |
6 |
Vendor: APPLICATION_VENDOR |
|
58301
e0efb29609bd
8225249 : LinuxDebBundler and LinuxRpmBundler should share more code
herrick
parents:
58037
diff
changeset
|
7 |
Prefix: %{dirname:APPLICATION_DIRECTORY} |
57038 | 8 |
Provides: APPLICATION_PACKAGE |
58037 | 9 |
%if "xAPPLICATION_GROUP" != x |
57790 | 10 |
Group: APPLICATION_GROUP |
11 |
%endif |
|
12 |
||
57038 | 13 |
Autoprov: 0 |
14 |
Autoreq: 0 |
|
58301
e0efb29609bd
8225249 : LinuxDebBundler and LinuxRpmBundler should share more code
herrick
parents:
58037
diff
changeset
|
15 |
%if "xPACKAGE_DEPENDENCIES" != x |
e0efb29609bd
8225249 : LinuxDebBundler and LinuxRpmBundler should share more code
herrick
parents:
58037
diff
changeset
|
16 |
Requires: PACKAGE_DEPENDENCIES |
e0efb29609bd
8225249 : LinuxDebBundler and LinuxRpmBundler should share more code
herrick
parents:
58037
diff
changeset
|
17 |
%endif |
57038 | 18 |
|
19 |
#avoid ARCH subfolder |
|
20 |
%define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm |
|
21 |
||
22 |
#comment line below to enable effective jar compression |
|
58037 | 23 |
#it could easily get your package size from 40 to 15Mb but |
57038 | 24 |
#build time will substantially increase and it may require unpack200/system java to install |
25 |
%define __jar_repack %{nil} |
|
26 |
||
27 |
%description |
|
28 |
APPLICATION_DESCRIPTION |
|
29 |
||
30 |
%prep |
|
31 |
||
32 |
%build |
|
33 |
||
34 |
%install |
|
35 |
rm -rf %{buildroot} |
|
58301
e0efb29609bd
8225249 : LinuxDebBundler and LinuxRpmBundler should share more code
herrick
parents:
58037
diff
changeset
|
36 |
install -d -m 755 %{buildroot}APPLICATION_DIRECTORY |
e0efb29609bd
8225249 : LinuxDebBundler and LinuxRpmBundler should share more code
herrick
parents:
58037
diff
changeset
|
37 |
cp -r %{_sourcedir}APPLICATION_DIRECTORY/* %{buildroot}APPLICATION_DIRECTORY |
57742
e3d4b9bc5093
8215447: Investigate if current implementation of --license-file is correct for RPM packages
herrick
parents:
57741
diff
changeset
|
38 |
%if "xAPPLICATION_LICENSE_FILE" != x |
e3d4b9bc5093
8215447: Investigate if current implementation of --license-file is correct for RPM packages
herrick
parents:
57741
diff
changeset
|
39 |
%define license_install_file %{_defaultlicensedir}/%{name}-%{version}/%{basename:APPLICATION_LICENSE_FILE} |
e3d4b9bc5093
8215447: Investigate if current implementation of --license-file is correct for RPM packages
herrick
parents:
57741
diff
changeset
|
40 |
install -d -m 755 %{buildroot}%{dirname:%{license_install_file}} |
e3d4b9bc5093
8215447: Investigate if current implementation of --license-file is correct for RPM packages
herrick
parents:
57741
diff
changeset
|
41 |
install -m 644 APPLICATION_LICENSE_FILE %{buildroot}%{license_install_file} |
e3d4b9bc5093
8215447: Investigate if current implementation of --license-file is correct for RPM packages
herrick
parents:
57741
diff
changeset
|
42 |
%endif |
58037 | 43 |
|
57038 | 44 |
%files |
58301
e0efb29609bd
8225249 : LinuxDebBundler and LinuxRpmBundler should share more code
herrick
parents:
58037
diff
changeset
|
45 |
%if "xAPPLICATION_LICENSE_FILE" != x |
e0efb29609bd
8225249 : LinuxDebBundler and LinuxRpmBundler should share more code
herrick
parents:
58037
diff
changeset
|
46 |
%license %{license_install_file} |
e0efb29609bd
8225249 : LinuxDebBundler and LinuxRpmBundler should share more code
herrick
parents:
58037
diff
changeset
|
47 |
%{dirname:%{license_install_file}} |
e0efb29609bd
8225249 : LinuxDebBundler and LinuxRpmBundler should share more code
herrick
parents:
58037
diff
changeset
|
48 |
%endif |
58037 | 49 |
# If installation directory for the application is /a/b/c, we want only root |
57761
6019ac908578
8215446 : JPackageCreateInstallerInstallDirTest fails on OLE7
herrick
parents:
57750
diff
changeset
|
50 |
# component of the path (/a) in the spec file to make sure all subdirectories |
6019ac908578
8215446 : JPackageCreateInstallerInstallDirTest fails on OLE7
herrick
parents:
57750
diff
changeset
|
51 |
# are owned by the package. |
58301
e0efb29609bd
8225249 : LinuxDebBundler and LinuxRpmBundler should share more code
herrick
parents:
58037
diff
changeset
|
52 |
%(echo APPLICATION_DIRECTORY | sed -e "s|\(^/[^/]\{1,\}\).*$|\1|") |
57038 | 53 |
|
54 |
%post |
|
58301
e0efb29609bd
8225249 : LinuxDebBundler and LinuxRpmBundler should share more code
herrick
parents:
58037
diff
changeset
|
55 |
DESKTOP_COMMANDS_INSTALL |
57038 | 56 |
|
57 |
%preun |
|
58301
e0efb29609bd
8225249 : LinuxDebBundler and LinuxRpmBundler should share more code
herrick
parents:
58037
diff
changeset
|
58 |
UTILITY_SCRIPTS |
e0efb29609bd
8225249 : LinuxDebBundler and LinuxRpmBundler should share more code
herrick
parents:
58037
diff
changeset
|
59 |
DESKTOP_COMMANDS_UNINSTALL |
57038 | 60 |
|
61 |
%clean |