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
33 %_libdir %{_exec_prefix}/%{_lib}
34 %_includedir %{_prefix}/include
35 %_oldincludedir /usr/include
36 %_infodir %{_prefix}/share/info
37 %_mandir %{_prefix}/share/man
38 %_initrddir %{_sysconfdir}/rc.d/init.d
41 %_defaultdocdir %{_usr}/share/doc
43 %_fmoddir %{_libdir}/gfortran/modules
45 # Executed at after copying %doc to DOCDIR, with $DOCDIR set
46 %__compress_doc @prefix@/lib/rpm/compress-doc%{?_noautocompressdoc: --noautocompressdoc='%{_noautocompressdoc}'}
49 %{__spec_install_post_strip}\
50 %{__spec_install_post_chrpath}\
51 %{__spec_install_post_compress_modules}\
52 %{__spec_install_post_check_so}\
53 %{__spec_install_post_check_tmpfiles}\
54 %{__spec_install_post_compress_docs}\
55 %{__spec_install_post_py_hardlink}\
56 %{__spec_install_post_perl_clean}\
57 %{__arch_install_post}\
61 %{expand:%%define __sip_%{?_enable_debug_packages} 1}%{?__sip_1:%{?__debug_package:%{__debug_install_post}}}%{expand:%%undefine __sip_%{?_enable_debug_packages}}\
62 %{__arch_install_post}\
66 #---------------------------------------------------------------------
67 # Template for debug information sub-package.
68 %_enable_debug_packages 1
72 %global __debug_package 1\
74 Summary: Debug information for package %{name}\
75 Summary(pl.UTF-8): Informacje dla debuggera dla pakietu %{name}\
76 Group: Development/Debug\
77 Requires: filesystem-debuginfo >= 3.0-16\
79 %description debuginfo\
80 This package provides debug information for package %{name}.\
81 Debug information is useful when developing applications that use this\
82 package or when debugging this package.\
83 %description debuginfo -l pl.UTF-8\
84 Ten pakiet dostarcza informacje dla debuggera dla pakietu %{name}.\
85 Informacje te są przydatne przy rozwijaniu aplikacji używających tego\
86 pakietu oraz przy odpluskwianiu samego pakietu.\
87 %files debuginfo -f debugfiles.list\
88 %defattr(-,root,root)\
92 #---------------------------------------------------------------------
93 # Overwrite RPM macros with PLD specific one here.
100 %__xar %{_bindir}/xar
102 %_tmppath %(echo "${TMPDIR:-/var/tmp}")
105 %_topdir %(echo $HOME)/rpm
107 %buildroot %{_tmppath}/%{name}-%{version}-root-%(id -u -n)
109 %_source_payload w9.gzdio
110 %_binary_payload w9.lzdio
112 %_rpmfc_magic_path /usr/share/file/magic
114 # provides don't obsolete
117 # Disable automatic dependencies on symlinks for now (debuginfo packages pull too many deps)
118 %_check_symlink_deps 0
120 # Do not generate executable() dependencies for scriptlets,
121 # as it may give false positives, for example:
122 # [ ! -x /bin/prog ] || /bin/prog
123 # will generate R:/bin/prog and we don't want that as /bin/prog is optional in this case
124 # 0 - Use external generator
125 # 1 - Use internal generator if available
126 # 2 - Use __scriptlet_requires to process scriptlet dependencies
127 %_use_internal_dependency_generator 1
129 %_duplicate_files_terminate_build 1
130 %_files_listed_twice_terminate_build 1
131 %_unpackaged_subdirs_terminate_build 0
134 # Export package NEVRA (stamped with install tid) info for HRMIB on this path.
136 # XXX Note: escaped %% for use in headerSprintf()
137 %_hrmib_path /var/cache/hrmib/%{___NVRA}
139 #-----------------------------------------------------------------
140 # CFLAGS and LDFLAGS used to build
142 %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}}
143 # -feliminate-dwarf2-dups disabled until PR ld/3290 is fixed.
145 %debugcflags -O0 -g -Wall
146 %debugcppflags %{nil}
149 %optldflags -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc
152 # Warning: those macros are overwritten by macros.build,
153 # left here for compatibility
154 %rpmcflags %(awk 'BEGIN {
155 split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I);
156 split("%{?filterout} %{?filterout_c} %{?filterout_ld}",F);
159 %rpmcppflags %(awk 'BEGIN {
160 split("%{?debug:%debugcppflags}%{!?debug:%optcppflags}%{?debuginfocppflags}",I);
161 split("%{?filterout} %{?filterout_cpp} %{?filterout_cpp}",F);
164 %rpmcxxflags %(awk 'BEGIN {
165 split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I);
166 split("%{?filterout} %{?filterout_cxx} %{?filterout_ld}",F);
169 %rpmldflags %(awk 'BEGIN {
170 split("%{?optldflags}",I);
171 split("%{?filterout_ld}",F)
175 # common compilation flags
176 %_fortify_cflags -Wp,-D_FORTIFY_SOURCE=2
178 # cf http://wiki.mandriva.com/en/Development/Packaging/Problems#format_not_a_string_literal_and_no_format_arguments
179 %Werror_cflags -Wformat -Werror=format-security
181 %_ssp_cflags -fstack-protector --param=ssp-buffer-size=4
182 %__common_cflags -O2 -fwrapv -pipe %{Werror_cflags} %{debuginfocflags} %{?_fortify_cflags} %{!?nospecflags:%{?specflags}}
183 %__common_cflags_with_ssp %{__common_cflags} %{?_ssp_cflags}
186 %ix86 i386 i486 i586 i686 pentium3 pentium4 athlon
187 %x8664 x86_64 amd64 ia32e
188 %ppc ppc ppc7400 ppc7450
190 # avoid fdatasync syscall flood during database operations.
193 #---------------------------------------------------------------------
194 # Expanded at end of %prep
197 %__chown_Rhf %{__chown} -Rhf
198 %__chgrp_Rhf %{__chgrp} -Rhf
199 %_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root
200 %_fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} root
201 %_fixperms %{__chmod} -Rf a+rX,u+w,g-w,o-w
206 # DO NOT put anything after this %%{load:...} !
208 # rpm5 prolog for loading the standard macro
209 %{load:/etc/rpm/macros.d/*.macros}