]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- sync macros and host definitions with our rpm4
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 7 Sep 2012 10:22:54 +0000 (12:22 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Fri, 7 Sep 2012 10:22:54 +0000 (12:22 +0200)
macros.pld.in
rpm.spec

index 8cc429c17f61d0d23ad02f6656da80793320a1e3..3cb7635b5dfe508e218c6d00034fe3c77b779917 100644 (file)
@@ -95,6 +95,11 @@ pakietu oraz przy odpluskwianiu samego pakietu.\
 #---------------------------------------------------------------------
 # Overwrite RPM macros with PLD specific one here.
 
+%__grep                        /bin/grep
+%__lua                 %{_bindir}/lua
+%__rc                  %{_bindir}/rc
+%__xar                 %{_bindir}/xar
+
 %_tmppath              %(echo "${TMPDIR:-/var/tmp}")
 %tmpdir                        %{_tmppath}
 
@@ -127,10 +132,26 @@ pakietu oraz przy odpluskwianiu samego pakietu.\
 
 # Warning: those macros are overwritten by macros.build,
 #          left here for compatibility
-%rpmcflags     %{nil}
-%rpmcxxflags   %{nil}
-%rpmldflags    %{nil}
-%rpmcppflags   %{nil}
+%rpmcflags %(awk 'BEGIN {
+       split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I);
+       split("%{?filterout} %{?filterout_c} %{?filterout_ld}",F);
+       %{filter_out}
+}')
+%rpmcppflags       %(awk 'BEGIN {
+       split("%{?debug:%debugcppflags}%{!?debug:%optcppflags}%{?debuginfocppflags}",I);
+       split("%{?filterout} %{?filterout_cpp} %{?filterout_cpp}",F);
+       %{filter_out}
+}')
+%rpmcxxflags       %(awk 'BEGIN {
+       split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I);
+       split("%{?filterout} %{?filterout_cxx} %{?filterout_ld}",F);
+       %{filter_out}
+}')
+%rpmldflags        %(awk 'BEGIN {
+       split("%{?optldflags}",I);
+       split("%{?filterout_ld}",F)
+       %{filter_out}
+}')
 
 # common compilation flags
 %_fortify_cflags       -Wp,-D_FORTIFY_SOURCE=2
index 3561eea1403a65c86557932dbe066772b1fb7061..15d4d2e3ddeaf0008d7269d3ab326925052d9562 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -55,7 +55,7 @@ Summary(ru.UTF-8):    Менеджер пакетов от RPM
 Summary(uk.UTF-8):     Менеджер пакетів від RPM
 Name:          rpm
 Version:       5.4.10
-Release:       0.1
+Release:       0.2
 License:       LGPL
 Group:         Base
 # http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.10-0.20120706.src.rpm
@@ -860,6 +860,13 @@ awk -f %{SOURCE6} %{SOURCE1}
 %{__autoconf}
 %{__automake}
 
+# rpm checks for CPU type at runtime, but it looks better
+sed -i \
+       -e 's|@host@|%{_target_cpu}-%{_target_vendor}-%{_target_os}|' \
+       -e 's|@host_cpu@|%{_target_cpu}|' \
+       -e 's|@host_os@|%{_target_os}|' \
+       macros.in
+
 %{?with_system_lua:CPPFLAGS="-I/usr/include/lua51 %{rpmcppflags}"}
 # pass CC and CXX too in case of building with some older configure macro
 %configure \
This page took 0.093747 seconds and 4 git commands to generate.