X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=macros.pld.in;h=4e1f81b715ac79531ac452778daed79cfed0320d;hb=000793b8790f12d832e8032f19ff1ed3faaffc7b;hp=d7d46c8ca7fd50d220a1b806c79254201d8b710c;hpb=d38aed8174fa67f41e0966a398993273447b08af;p=packages%2Frpm.git diff --git a/macros.pld.in b/macros.pld.in index d7d46c8..4e1f81b 100644 --- a/macros.pld.in +++ b/macros.pld.in @@ -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. #============================================================================== @@ -24,12 +25,11 @@ %_exec_prefix %{_prefix} %_bindir %{_exec_prefix}/bin %_sbindir %{_exec_prefix}/sbin -%_libexecdir %{_exec_prefix}/%{_lib} +%_libexecdir %{_exec_prefix}/libexec %_datadir %{_prefix}/share %_sysconfdir %{_prefix}/etc %_sharedstatedir /var/lib %_localstatedir /var -%_lib lib %_libdir %{_exec_prefix}/%{_lib} %_includedir %{_prefix}/include %_oldincludedir /usr/include @@ -46,23 +46,27 @@ %__compress_doc @prefix@/lib/rpm/compress-doc%{?_noautocompressdoc: --noautocompressdoc='%{_noautocompressdoc}'} %__os_install_post \ -%ifnarch noarch\ %{__spec_install_post_strip}\ %{__spec_install_post_chrpath}\ %{__spec_install_post_compress_modules}\ -%endif\ %{__spec_install_post_check_so}\ %{__spec_install_post_check_tmpfiles}\ +%{__spec_install_post_check_shebangs}\ %{__spec_install_post_compress_docs}\ %{__spec_install_post_py_hardlink}\ %{__spec_install_post_perl_clean}\ %{__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 +93,13 @@ pakietu oraz przy odpluskwianiu samego pakietu.\ #--------------------------------------------------------------------- # Overwrite RPM macros with PLD specific one here. +%__cp /bin/cp +%__find /usr/bin/find +%__grep /bin/grep +%__lua %{_bindir}/lua +%__rc %{_bindir}/rc +%__xar %{_bindir}/xar + %_tmppath %(echo "${TMPDIR:-/var/tmp}") %tmpdir %{_tmppath} @@ -97,15 +108,35 @@ pakietu oraz przy odpluskwianiu samego pakietu.\ %buildroot %{_tmppath}/%{name}-%{version}-root-%(id -u -n) %_source_payload w9.gzdio -%_binary_payload w9.lzdio +%_binary_payload w6.lzdio %_rpmfc_magic_path /usr/share/file/magic -%undefine __scriptlet_requires - -# provides dont obsolete +# provides don't obsolete %_upgrade_tag name +# Disable automatic dependencies on symlinks for now (debuginfo packages pull too many deps) +%_check_symlink_deps 0 + +# Do not generate executable() dependencies for scriptlets, +# as it may give false positives, for example: +# [ ! -x /bin/prog ] || /bin/prog +# will generate R:/bin/prog and we don't want that as /bin/prog is optional in this case +# 0 - Use external generator +# 1 - Use internal generator if available +# 2 - Use __scriptlet_requires to process scriptlet dependencies +%_use_internal_dependency_generator 1 + +%_duplicate_files_terminate_build 1 +%_files_listed_twice_terminate_build 1 +%_unpackaged_subdirs_terminate_build 0 + +# +# Export package NEVRA (stamped with install tid) info for HRMIB on this path. +# +# XXX Note: escaped %% for use in headerSprintf() +%_hrmib_path /var/cache/hrmib/%{___NVRA} + #----------------------------------------------------------------- # CFLAGS and LDFLAGS used to build @@ -121,10 +152,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 @@ -132,15 +179,18 @@ pakietu oraz przy odpluskwianiu samego pakietu.\ # 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}}} +# Use -Werror=trampolines to prevent GCC from generating code that require executable stack +%_ssp_cflags -fstack-protector-strong --param=ssp-buffer-size=4 -Werror=trampolines +%__common_cflags -O2 -fwrapv -pipe %{Werror_cflags} %{debuginfocflags} %{?_fortify_cflags} %{!?nospecflags:%{?specflags}} +%__common_cflags_with_ssp %{__common_cflags} %{?_ssp_cflags} # arch macros %ix86 i386 i486 i586 i686 pentium3 pentium4 athlon %x8664 x86_64 amd64 ia32e %ppc ppc ppc7400 ppc7450 +# avoid fdatasync syscall flood during database operations. +%__nofsync nofsync #--------------------------------------------------------------------- # Expanded at end of %prep @@ -154,6 +204,8 @@ pakietu oraz przy odpluskwianiu samego pakietu.\ %__id /bin/id +# +# DO NOT put anything after this %%{load:...} ! # # rpm5 prolog for loading the standard macro %{load:/etc/rpm/macros.d/*.macros}