]>
Commit | Line | Data |
---|---|---|
e0cea210 ER |
1 | # PLD Linux rpm macros |
2 | # vim:ft=spec | |
08697680 JR |
3 | |
4 | %distribution PLD Linux | |
e0cea210 | 5 | %vendor pld |
08697680 JR |
6 | %bugurl http://bugs.pld-linux.org/ |
7 | %disturl http://www.pld-linux.org/ | |
8 | %pld_release th | |
9 | ||
e0cea210 | 10 | # |
08697680 JR |
11 | # Per-platform rpm configuration file. |
12 | ||
13 | #============================================================================== | |
14 | # ---- per-platform macros. | |
15 | # | |
16 | %_vendor pld | |
17 | %_os linux | |
d38aed81 | 18 | %_target_platform %{_target_cpu}-%{_vendor}-%{_target_os} |
08697680 JR |
19 | |
20 | #============================================================================== | |
21 | # ---- configure macros. note that most of these are inherited | |
22 | # from the defaults. | |
23 | # | |
24 | %_prefix /usr | |
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 | |
32 | %_localstatedir /var | |
08697680 JR |
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 | |
39 | %_sysconfdir /etc | |
40 | ||
41 | %_defaultdocdir %{_usr}/share/doc | |
42 | ||
43 | %_fmoddir %{_libdir}/gfortran/modules | |
44 | ||
45 | # Executed at after copying %doc to DOCDIR, with $DOCDIR set | |
46 | %__compress_doc @prefix@/lib/rpm/compress-doc%{?_noautocompressdoc: --noautocompressdoc='%{_noautocompressdoc}'} | |
47 | ||
48 | %__os_install_post \ | |
2fc2b0f5 | 49 | %{?ifnarch noarch:\ |
08697680 JR |
50 | %{__spec_install_post_strip}\ |
51 | %{__spec_install_post_chrpath}\ | |
41da1a46 | 52 | %{__spec_install_post_compress_modules}\ |
08697680 | 53 | %{__spec_install_post_check_so}\ |
2fc2b0f5 | 54 | %endif}\ |
08697680 JR |
55 | %{__spec_install_post_check_tmpfiles}\ |
56 | %{__spec_install_post_compress_docs}\ | |
08697680 JR |
57 | %{__spec_install_post_py_hardlink}\ |
58 | %{__spec_install_post_perl_clean}\ | |
59 | %{__arch_install_post}\ | |
60 | %{nil} | |
61 | ||
33c1e7b7 JR |
62 | %__spec_install_post\ |
63 | %{expand:%%define __sip_%{?_enable_debug_packages} 1}%{?__sip_1:%{?__debug_package:%{__debug_install_post}}}%{expand:%%undefine __sip_%{?_enable_debug_packages}}\ | |
64 | %{__arch_install_post}\ | |
65 | %{__os_install_post}\ | |
66 | %{nil} | |
67 | ||
08697680 JR |
68 | #--------------------------------------------------------------------- |
69 | # Template for debug information sub-package. | |
70 | %_enable_debug_packages 1 | |
08697680 JR |
71 | |
72 | %debug_package \ | |
73 | %ifnarch noarch\ | |
74 | %global __debug_package 1\ | |
75 | %package debuginfo\ | |
76 | Summary: Debug information for package %{name}\ | |
77 | Summary(pl.UTF-8): Informacje dla debuggera dla pakietu %{name}\ | |
78 | Group: Development/Debug\ | |
79 | Requires: filesystem-debuginfo >= 3.0-16\ | |
80 | AutoReqProv: 0\ | |
81 | %description debuginfo\ | |
82 | This package provides debug information for package %{name}.\ | |
83 | Debug information is useful when developing applications that use this\ | |
84 | package or when debugging this package.\ | |
85 | %description debuginfo -l pl.UTF-8\ | |
86 | Ten pakiet dostarcza informacje dla debuggera dla pakietu %{name}.\ | |
87 | Informacje te są przydatne przy rozwijaniu aplikacji używających tego\ | |
88 | pakietu oraz przy odpluskwianiu samego pakietu.\ | |
89 | %files debuginfo -f debugfiles.list\ | |
90 | %defattr(-,root,root)\ | |
91 | %endif\ | |
92 | %{nil} | |
93 | ||
94 | #--------------------------------------------------------------------- | |
95 | # Overwrite RPM macros with PLD specific one here. | |
96 | ||
048d06f8 JR |
97 | %__grep /bin/grep |
98 | %__lua %{_bindir}/lua | |
99 | %__rc %{_bindir}/rc | |
100 | %__xar %{_bindir}/xar | |
101 | ||
08697680 JR |
102 | %_tmppath %(echo "${TMPDIR:-/var/tmp}") |
103 | %tmpdir %{_tmppath} | |
104 | ||
105 | %_topdir %(echo $HOME)/rpm | |
106 | ||
107 | %buildroot %{_tmppath}/%{name}-%{version}-root-%(id -u -n) | |
108 | ||
109 | %_source_payload w9.gzdio | |
110 | %_binary_payload w9.lzdio | |
111 | ||
112 | %_rpmfc_magic_path /usr/share/file/magic | |
113 | ||
114 | %undefine __scriptlet_requires | |
115 | ||
e0cea210 | 116 | # provides don't obsolete |
08697680 JR |
117 | %_upgrade_tag name |
118 | ||
119 | #----------------------------------------------------------------- | |
120 | # CFLAGS and LDFLAGS used to build | |
121 | ||
d38aed81 | 122 | %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}} |
08697680 JR |
123 | # -feliminate-dwarf2-dups disabled until PR ld/3290 is fixed. |
124 | ||
d38aed81 JR |
125 | %debugcflags -O0 -g -Wall |
126 | %debugcppflags %{nil} | |
127 | %debugldflags %{nil} | |
08697680 | 128 | |
d38aed81 JR |
129 | %optldflags -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc |
130 | %optcppflags %{nil} | |
08697680 JR |
131 | |
132 | # Warning: those macros are overwritten by macros.build, | |
133 | # left here for compatibility | |
048d06f8 JR |
134 | %rpmcflags %(awk 'BEGIN { |
135 | split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I); | |
136 | split("%{?filterout} %{?filterout_c} %{?filterout_ld}",F); | |
137 | %{filter_out} | |
138 | }') | |
139 | %rpmcppflags %(awk 'BEGIN { | |
140 | split("%{?debug:%debugcppflags}%{!?debug:%optcppflags}%{?debuginfocppflags}",I); | |
141 | split("%{?filterout} %{?filterout_cpp} %{?filterout_cpp}",F); | |
142 | %{filter_out} | |
143 | }') | |
144 | %rpmcxxflags %(awk 'BEGIN { | |
145 | split("%{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}",I); | |
146 | split("%{?filterout} %{?filterout_cxx} %{?filterout_ld}",F); | |
147 | %{filter_out} | |
148 | }') | |
149 | %rpmldflags %(awk 'BEGIN { | |
150 | split("%{?optldflags}",I); | |
151 | split("%{?filterout_ld}",F) | |
152 | %{filter_out} | |
153 | }') | |
d38aed81 JR |
154 | |
155 | # common compilation flags | |
156 | %_fortify_cflags -Wp,-D_FORTIFY_SOURCE=2 | |
157 | ||
158 | # cf http://wiki.mandriva.com/en/Development/Packaging/Problems#format_not_a_string_literal_and_no_format_arguments | |
159 | %Werror_cflags -Wformat -Werror=format-security | |
160 | ||
161 | %_ssp_cflags -fstack-protector --param=ssp-buffer-size=4 | |
162 | %__common_cflags -O2 -fwrapv %{debuginfocflags} -pipe %{Werror_cflags} %{?_fortify_cflags} | |
04900a4a | 163 | %__common_cflags_with_ssp %{__common_cflags} %{?_ssp_cflags} %{!?nospecflags:%{?specflags}} |
08697680 JR |
164 | |
165 | # arch macros | |
166 | %ix86 i386 i486 i586 i686 pentium3 pentium4 athlon | |
167 | %x8664 x86_64 amd64 ia32e | |
168 | %ppc ppc ppc7400 ppc7450 | |
169 | ||
170 | ||
171 | #--------------------------------------------------------------------- | |
172 | # Expanded at end of %prep | |
173 | # | |
174 | %__id_u %{__id} -u | |
175 | %__chown_Rhf %{__chown} -Rhf | |
176 | %__chgrp_Rhf %{__chgrp} -Rhf | |
177 | %_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root | |
178 | %_fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} root | |
179 | %_fixperms %{__chmod} -Rf a+rX,u+w,g-w,o-w | |
180 | ||
181 | %__id /bin/id | |
182 | ||
183 | # | |
184 | # rpm5 prolog for loading the standard macro | |
185 | %{load:/etc/rpm/macros.d/*.macros} |