4 %distribution PLD Linux
6 %bugurl http://bugs.pld-linux.org/
7 %disturl http://www.pld-linux.org/
11 # Per-platform rpm configuration file.
13 #==============================================================================
14 # ---- per-platform macros.
18 %_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}
20 #==============================================================================
21 # ---- configure macros. note that most of these are inherited
25 %_exec_prefix %{_prefix}
26 %_bindir %{_exec_prefix}/bin
27 %_sbindir %{_exec_prefix}/sbin
28 %_libexecdir %{_exec_prefix}/%{_lib}
29 %_datadir %{_prefix}/share
30 %_sysconfdir %{_prefix}/etc
31 %_sharedstatedir /var/lib
34 %_libdir %{_exec_prefix}/%{_lib}
35 %_includedir %{_prefix}/include
36 %_oldincludedir /usr/include
37 %_infodir %{_prefix}/share/info
38 %_mandir %{_prefix}/share/man
39 %_initrddir %{_sysconfdir}/rc.d/init.d
42 %_defaultdocdir %{_usr}/share/doc
44 %_fmoddir %{_libdir}/gfortran/modules
46 # Executed at after copying %doc to DOCDIR, with $DOCDIR set
47 %__compress_doc @prefix@/lib/rpm/compress-doc%{?_noautocompressdoc: --noautocompressdoc='%{_noautocompressdoc}'}
51 %{__spec_install_post_strip}\
52 %{__spec_install_post_chrpath}\
53 %{__spec_install_post_compress_modules}\
55 %{__spec_install_post_check_so}\
56 %{__spec_install_post_check_tmpfiles}\
57 %{__spec_install_post_compress_docs}\
58 %{__spec_install_post_py_hardlink}\
59 %{__spec_install_post_perl_clean}\
60 %{__arch_install_post}\
63 #---------------------------------------------------------------------
64 # Template for debug information sub-package.
65 %_enable_debug_packages 1
66 %{expand:%%define __sip_%{?_enable_debug_packages} 1}%{?__sip_1:%{?__debug_package:%{__debug_install_post}}}%{expand:%%undefine __sip_%{?_enable_debug_packages}}\
70 %global __debug_package 1\
72 Summary: Debug information for package %{name}\
73 Summary(pl.UTF-8): Informacje dla debuggera dla pakietu %{name}\
74 Group: Development/Debug\
75 Requires: filesystem-debuginfo >= 3.0-16\
77 %description debuginfo\
78 This package provides debug information for package %{name}.\
79 Debug information is useful when developing applications that use this\
80 package or when debugging this package.\
81 %description debuginfo -l pl.UTF-8\
82 Ten pakiet dostarcza informacje dla debuggera dla pakietu %{name}.\
83 Informacje te są przydatne przy rozwijaniu aplikacji używających tego\
84 pakietu oraz przy odpluskwianiu samego pakietu.\
85 %files debuginfo -f debugfiles.list\
86 %defattr(-,root,root)\
90 #---------------------------------------------------------------------
91 # Overwrite RPM macros with PLD specific one here.
93 %_tmppath %(echo "${TMPDIR:-/var/tmp}")
96 %_topdir %(echo $HOME)/rpm
98 %buildroot %{_tmppath}/%{name}-%{version}-root-%(id -u -n)
100 %_source_payload w9.gzdio
101 %_binary_payload w9.lzdio
103 %_rpmfc_magic_path /usr/share/file/magic
105 %undefine __scriptlet_requires
107 # provides don't obsolete
110 #-----------------------------------------------------------------
111 # CFLAGS and LDFLAGS used to build
113 %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}}
114 # -feliminate-dwarf2-dups disabled until PR ld/3290 is fixed.
116 %debugcflags -O0 -g -Wall
117 %debugcppflags %{nil}
120 %optldflags -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc
123 # Warning: those macros are overwritten by macros.build,
124 # left here for compatibility
130 # common compilation flags
131 %_fortify_cflags -Wp,-D_FORTIFY_SOURCE=2
133 # cf http://wiki.mandriva.com/en/Development/Packaging/Problems#format_not_a_string_literal_and_no_format_arguments
134 %Werror_cflags -Wformat -Werror=format-security
136 %_ssp_cflags -fstack-protector --param=ssp-buffer-size=4
137 %__common_cflags -O2 -fwrapv %{debuginfocflags} -pipe %{Werror_cflags} %{?_fortify_cflags}
138 %__common_cflags_with_ssp %{__common_cflags} %{?_ssp_cflags} %{!?nospecflags:%{?specflags}}}
141 %ix86 i386 i486 i586 i686 pentium3 pentium4 athlon
142 %x8664 x86_64 amd64 ia32e
143 %ppc ppc ppc7400 ppc7450
146 #---------------------------------------------------------------------
147 # Expanded at end of %prep
150 %__chown_Rhf %{__chown} -Rhf
151 %__chgrp_Rhf %{__chgrp} -Rhf
152 %_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root
153 %_fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} root
154 %_fixperms %{__chmod} -Rf a+rX,u+w,g-w,o-w
159 # rpm5 prolog for loading the standard macro
160 %{load:/etc/rpm/macros.d/*.macros}