1 | # OS/2 specific rpm configuration file.
|
---|
2 |
|
---|
3 | #------------------------------------------------------------------------------
|
---|
4 | # Macros needed at rpm runtime (package installation and such)
|
---|
5 |
|
---|
6 | # Path to OS/2 specific rpm configuration directory containing helper scripts
|
---|
7 | %_rpmconfigdir_os2 @RPMCONFIGDIR_OS2@
|
---|
8 |
|
---|
9 | # OS/2 boot drive
|
---|
10 | %os2_boot_drive %(%{_rpmconfigdir_os2}/getbootdrive.exe)
|
---|
11 |
|
---|
12 | # Converts a Unix path to a DOS path (backward slashes) expanding /@unixroot to
|
---|
13 | # a current value of UNIXROOT if it starts the path.
|
---|
14 | %os2_dos_path() %{lua:
|
---|
15 | path = rpm.expand("%{?1}")
|
---|
16 | if (string.sub(path, 1, 10) == "/@unixroot" and
|
---|
17 | (string.len(path) == 10 or string.sub(path, 11, 11) == '/')) then
|
---|
18 | path = os.getenv("UNIXROOT") .. string.sub(path, 11)
|
---|
19 | end
|
---|
20 | path = string.gsub(path, "/", "\\\\")
|
---|
21 | print(path)
|
---|
22 | }
|
---|
23 |
|
---|
24 | # Current UNIXROOT value in DOS format (backward slashes)
|
---|
25 | %os2_unixroot_path() %{os2_dos_path /@unixroot}
|
---|
26 |
|
---|
27 | #------------------------------------------------------------------------------
|
---|
28 | # Macros needed at package creation time
|
---|
29 |
|
---|
30 | # Path to script that installs legacy runtime libraries.
|
---|
31 | %__legacy_runtime_install_post \
|
---|
32 | %{_rpmconfigdir_os2}/find-legacy-runtime.sh install "%{_target_cpu}" "%{_builddir}/%{?buildsubdir}"\
|
---|
33 | %{nil}
|
---|
34 |
|
---|
35 | # Template for legacy runtime sub-packages.
|
---|
36 | %legacy_runtime_packages \
|
---|
37 | %global __legacy_runtime_packages 1\
|
---|
38 | %{expand:%(%{_rpmconfigdir_os2}/find-legacy-runtime.sh package "%{name}" "%{_sourcedir}" "%{_target_cpu}" "%{buildroot}")}\
|
---|
39 | %{nil}
|
---|
40 |
|
---|
41 | # List of debug files generated by brp-strip-os2 with %exclude prepended (to be
|
---|
42 | # used with -f option in %files to automatically exclude them from packages).
|
---|
43 | %debug_package_exclude_files "%{_builddir}/%{?buildsubdir}/exclude-debugfiles.list"
|
---|
44 |
|
---|
45 | # Only run what we really need in post-install on OS/2.
|
---|
46 | %__os_install_post \
|
---|
47 | %{_rpmconfigdir}/brp-compress "./@unixroot"\
|
---|
48 | %{_rpmconfigdir_os2}/brp-strip-os2 "%{_builddir}/%{?buildsubdir}" %{?_strip_no_compress:--no-compress} %{!?__debug_package:--no-debuginfo} %{?_strip_opts}\
|
---|
49 | %{?__legacy_runtime_packages:%{__legacy_runtime_install_post}}\
|
---|
50 | %{?__debug_package:%{__sed} -e 's/^/%exclude /' "%{_builddir}/%{?buildsubdir}/debugfiles.list" > %{debug_package_exclude_files}}\
|
---|
51 | %{nil}
|
---|
52 |
|
---|
53 | # Disable using find-debuginfo.sh, brp-strip-os2 does the job.
|
---|
54 | %__debug_install_post %{nil}
|
---|