# OS/2 specific rpm configuration file. #------------------------------------------------------------------------------ # Macros needed at rpm runtime (package installation and such) # Path to OS/2 specific rpm configuration directory containing helper scripts %_rpmconfigdir_os2 @RPMCONFIGDIR_OS2@ # OS/2 boot drive %os2_boot_drive %(%{_rpmconfigdir_os2}/getbootdrive.exe) # Converts a Unix path to a DOS path (backward slashes) expanding /@unixroot to # a current value of UNIXROOT if it starts the path. %os2_dos_path() %{lua: path = rpm.expand("%{?1}") if (string.sub(path, 1, 10) == "/@unixroot" and (string.len(path) == 10 or string.sub(path, 11, 11) == '/')) then path = os.getenv("UNIXROOT") .. string.sub(path, 11) end path = string.gsub(path, "/", "\\\\") print(path) } # Current UNIXROOT value in DOS format (backward slashes) %os2_unixroot_path() %{os2_dos_path /@unixroot} #------------------------------------------------------------------------------ # Macros needed at package creation time # Path to script that installs legacy runtime libraries. %__legacy_runtime_install_post \ %{_rpmconfigdir_os2}/find-legacy-runtime.sh install "%{_target_cpu}" "%{_builddir}/%{?buildsubdir}"\ %{nil} # Template for legacy runtime sub-packages. %legacy_runtime_packages \ %global __legacy_runtime_packages 1\ %{expand:%(%{_rpmconfigdir_os2}/find-legacy-runtime.sh package "%{name}" "%{_sourcedir}" "%{_target_cpu}" "%{buildroot}")}\ %{nil} # List of debug files generated by brp-strip-os2 with %exclude prepended (to be # used with -f option in %files to automatically exclude them from packages). %debug_package_exclude_files "%{_builddir}/%{?buildsubdir}/exclude-debugfiles.list" # Only run what we really need in post-install on OS/2. %__os_install_post \ %{_rpmconfigdir}/brp-compress "./@unixroot"\ %{_rpmconfigdir_os2}/brp-strip-os2 "%{_builddir}/%{?buildsubdir}" %{?_strip_no_compress:--no-compress} %{!?__debug_package:--no-debuginfo} %{?_strip_opts}\ %{?__legacy_runtime_packages:%{__legacy_runtime_install_post}}\ %{?__debug_package:%{__sed} -e 's/^/%exclude /' "%{_builddir}/%{?buildsubdir}/debugfiles.list" > %{debug_package_exclude_files}}\ %{nil} # Disable using find-debuginfo.sh, brp-strip-os2 does the job. %__debug_install_post %{nil}