]> git.pld-linux.org Git - packages/rpm.git/blobdiff - macros.pld.in
- shut up rpm complaining about CHAR_TYPE noy being INT8_TYPE on header
[packages/rpm.git] / macros.pld.in
index ecdcb62fa5a9a7ec77e12f08c5cecd9495b94e8d..bafd6aab5148eed7aa8baa0398f82da0e6a29c60 100644 (file)
@@ -1,12 +1,13 @@
-# PLD rpm macros
+# PLD Linux rpm macros
+# vim:ft=spec
 
 %distribution          PLD Linux
-%vendor                        pld 
+%vendor                        pld
 %bugurl                        http://bugs.pld-linux.org/
 %disturl               http://www.pld-linux.org/
 %pld_release           th
 
-# 
+#
 # Per-platform rpm configuration file.
 
 #==============================================================================
@@ -14,7 +15,7 @@
 #
 %_vendor               pld
 %_os                   linux
-%_target_platform      %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}
+%_target_platform      %{_target_cpu}-%{_vendor}-%{_target_os}
 
 #==============================================================================
 # ---- configure macros.  note that most of these are inherited
@@ -29,7 +30,6 @@
 %_sysconfdir           %{_prefix}/etc
 %_sharedstatedir       /var/lib
 %_localstatedir                /var
-%_lib                  lib
 %_libdir               %{_exec_prefix}/%{_lib}
 %_includedir           %{_prefix}/include
 %_oldincludedir                /usr/include
 %__compress_doc                @prefix@/lib/rpm/compress-doc%{?_noautocompressdoc: --noautocompressdoc='%{_noautocompressdoc}'}
 
 %__os_install_post \
-%ifnarch noarch\
+%{?ifnarch noarch:\
 %{__spec_install_post_strip}\
 %{__spec_install_post_chrpath}\
 %{__spec_install_post_compress_modules}\
-%endif\
 %{__spec_install_post_check_so}\
+%endif}\
 %{__spec_install_post_check_tmpfiles}\
 %{__spec_install_post_compress_docs}\
 %{__spec_install_post_py_hardlink}\
 %{__arch_install_post}\
 %{nil}
 
+%__spec_install_post\
+%{expand:%%define __sip_%{?_enable_debug_packages} 1}%{?__sip_1:%{?__debug_package:%{__debug_install_post}}}%{expand:%%undefine __sip_%{?_enable_debug_packages}}\
+%{__arch_install_post}\
+%{__os_install_post}\
+%{nil}
+
 #---------------------------------------------------------------------
 #      Template for debug information sub-package.
 %_enable_debug_packages                1
-%{expand:%%define __sip_%{?_enable_debug_packages} 1}%{?__sip_1:%{?__debug_package:%{__debug_install_post}}}%{expand:%%undefine __sip_%{?_enable_debug_packages}}\
 
 %debug_package \
 %ifnarch noarch\
@@ -89,6 +94,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}
 
@@ -109,22 +119,48 @@ pakietu oraz przy odpluskwianiu samego pakietu.\
 #-----------------------------------------------------------------
 # CFLAGS and LDFLAGS used to build
 
-%debuginfocflags       %{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1: -gdwarf-2 -g2}%{expand:%%undefine __dic_%{?_enable_debug_packages}}
+%debuginfocflags       %{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1: -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2}%{expand:%%undefine __dic_%{?_enable_debug_packages}}
 # -feliminate-dwarf2-dups disabled until PR ld/3290 is fixed.
 
-%debugcflags   -O0 -g -Wall
-%debugcppflags %{nil}
-%debugldflags  %{nil}
+%debugcflags   -O0 -g -Wall
+%debugcppflags %{nil}
+%debugldflags  %{nil}
 
-%optldflags    -Wl,--as-needed -Wl,-z,relro -Wl,-z,-combreloc
-%optcppflags   -D_FORTIFY_SOURCE=2
+%optldflags    -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc
+%optcppflags   %{nil}
 
 # Warning: those macros are overwritten by macros.build,
 #          left here for compatibility
-%rpmcflags     %{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}
-%rpmcxxflags   %{rpmcflags}
-%rpmldflags    %{!?no_build_with_as_needed:-Wl,--as-needed}
-%rpmcppflags   -D_FORTIFY_SOURCE=2
+%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
+
+# cf http://wiki.mandriva.com/en/Development/Packaging/Problems#format_not_a_string_literal_and_no_format_arguments
+%Werror_cflags         -Wformat -Werror=format-security
+
+%_ssp_cflags           -fstack-protector --param=ssp-buffer-size=4
+%__common_cflags       -O2 -fwrapv %{debuginfocflags} -pipe %{Werror_cflags} %{?_fortify_cflags}
+%__common_cflags_with_ssp      %{__common_cflags} %{?_ssp_cflags} %{!?nospecflags:%{?specflags}}
 
 # arch macros
 %ix86  i386 i486 i586 i686 pentium3 pentium4 athlon
This page took 0.042295 seconds and 4 git commands to generate.