Changeset 1185 for spec/trunk/SPECS/os2-rpm/macros.os2
- Timestamp:
- Jun 9, 2017, 5:09:03 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
spec/trunk/SPECS/os2-rpm/macros.os2
r1169 r1185 1 1 # OS/2 specific rpm configuration file. 2 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 3 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 4 29 5 30 # Path to script that installs legacy runtime libraries.
Note:
See TracChangeset
for help on using the changeset viewer.