]>
Commit | Line | Data |
---|---|---|
a8bf9720 AF |
1 | # PLD rpm macros |
2 | ||
b5b20129 AM |
3 | # other macros |
4 | %_enable_debug_packages 1 | |
5 | ||
5b0f0ac9 MM |
6 | %__id @__ID@ |
7 | %__id_u %{__id} -u | |
8 | %__chown_Rhf @__CHOWN_RHF@ | |
9 | %__chgrp_Rhf @__CHGRP_RHF@ | |
10 | ||
9fc84bee | 11 | %_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root:@ROOT_GROUP@ |
a8bf9720 | 12 | %_fixgroup true |
5b0f0ac9 | 13 | %_fixperms %{__chmod} -Rf @FIXPERMS@ |
a8bf9720 | 14 | %_topdir %(echo $HOME)/rpm |
cd33aab7 AM |
15 | #----------------------------------------------------------------- |
16 | # CFLAGS and LDFLAGS used to build | |
17 | ||
b5b20129 | 18 | %if %{_enable_debug_packages}%{!?_enable_debug_packages:0} |
a8dfa3f7 | 19 | %debuginfocflags -ggdb |
b5b20129 AM |
20 | %endif |
21 | ||
5b0f0ac9 | 22 | %debugcflags -O0 -g -Wall |
b5b20129 | 23 | %rpmcflags %{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags:%debuginfocflags} |
7c2eac51 | 24 | %rpmldflags %{nil} |
cd33aab7 | 25 | |
a544555d | 26 | # kernel compiler |
cabacfeb | 27 | %kgcc gcc |
28 | %kgcc_package gcc | |
a544555d | 29 | |
5f9f9bd7 | 30 | # Build system path macros. |
31 | # | |
32 | %__libtoolize libtoolize --copy --force | |
aad1c8e4 | 33 | %__gettextize { \ |
4da2b97a | 34 | if ! gettextize --version | grep -q '0\.10\.' ; then \ |
4cd84746 JB |
35 | if grep -qs 'AM_GNU_GETTEXT.*external' configure.{ac,in} ; then \ |
36 | gettextize --copy --force --no-changelog; \ | |
93bce43f | 37 | else \ |
4cd84746 JB |
38 | gettextize --copy --force --no-changelog --intl; \ |
39 | fi; \ | |
40 | if [ ! -f po/Makevars ]; then \ | |
41 | cp -f po/Makevars{.template,}; \ | |
42 | fi; \ | |
43 | else \ | |
44 | gettextize --copy --force; \ | |
aad1c8e4 | 45 | fi; \ |
4cd84746 JB |
46 | } |
47 | %__autopoint autopoint --force | |
fa4547da | 48 | %__automake automake -a -c -f --foreign |
4413e4a3 | 49 | %__autoconf autoconf %{?debug:-Wall} |
5f9f9bd7 | 50 | |
cd33aab7 | 51 | #----------------------------------------------------------------- |
9f0287b5 | 52 | %configure2_13 { \ |
cd33aab7 AM |
53 | if [ -n "$LINGUAS" ]; then unset LINGUAS; fi; \ |
54 | LDFLAGS="${LDFLAGS:-%rpmldflags}" ; export LDFLAGS ; \ | |
55 | CFLAGS="${CFLAGS:-%rpmcflags}" ; export CFLAGS ; \ | |
56 | CXXFLAGS="${CXXFLAGS:-%rpmcflags}" ; export CXXFLAGS ; \ | |
57 | FFLAGS="${FFLAGS:-%rpmcflags}" ; export FFLAGS ; \ | |
c55f2219 | 58 | CPPFLAGS="${CPPFLAGS:-}" ; export CPPFLAGS ; \ |
4eac2e49 AM |
59 | %{?__cc:CC="%{__cc}" ; export CC ; } \ |
60 | %{?__cxx:CXX="%{__cxx}" ; export CXX ; } \ | |
5b0f0ac9 | 61 | %{?configuredir:%{configuredir}}%{!?configuredir:.}/configure \ |
fa74a11c | 62 | --host=%{_target_platform} \ |
cd33aab7 AM |
63 | --prefix=%{_prefix} \ |
64 | --exec-prefix=%{_exec_prefix} \ | |
65 | --bindir=%{_bindir} \ | |
66 | --sbindir=%{_sbindir} \ | |
67 | --sysconfdir=%{_sysconfdir} \ | |
68 | --datadir=%{_datadir} \ | |
69 | --includedir=%{_includedir} \ | |
70 | --libdir=%{_libdir} \ | |
71 | --libexecdir=%{_libexecdir} \ | |
72 | --localstatedir=%{_localstatedir} \ | |
73 | --sharedstatedir=%{_sharedstatedir} \ | |
74 | --mandir=%{_mandir} \ | |
75 | --infodir=%{_infodir} \ | |
72d080a8 | 76 | --x-libraries=/usr/X11R6/%{_lib} \ |
cd33aab7 AM |
77 | } |
78 | ||
85f82bec | 79 | #---------------------------------------------------------------- |
b8cf6778 | 80 | %configure {./configure \ |
85f82bec AF |
81 | LDFLAGS="${LDFLAGS:-%rpmldflags}" \ |
82 | CFLAGS="${CFLAGS:-%rpmcflags}" \ | |
83 | CXXFLAGS="${CXXFLAGS:-%rpmcflags}" \ | |
84 | FFLAGS="${FFLAGS:-%rpmcflags}" \ | |
418d9760 | 85 | CPPFLAGS="${CPPFLAGS:-}" \ |
4eac2e49 AM |
86 | %{?__cc:CC="%{__cc}"} \ |
87 | %{?__cxx:CXX="%{__cxx}"} \ | |
85f82bec AF |
88 | --build=%{_target_platform} \ |
89 | --prefix=%{_prefix} \ | |
90 | --exec-prefix=%{_exec_prefix} \ | |
91 | --bindir=%{_bindir} \ | |
92 | --sbindir=%{_sbindir} \ | |
93 | --sysconfdir=%{_sysconfdir} \ | |
94 | --datadir=%{_datadir} \ | |
95 | --includedir=%{_includedir} \ | |
96 | --libdir=%{_libdir} \ | |
97 | --libexecdir=%{_libexecdir} \ | |
98 | --localstatedir=%{_localstatedir} \ | |
99 | --sharedstatedir=%{_sharedstatedir} \ | |
100 | --mandir=%{_mandir} \ | |
101 | --infodir=%{_infodir} \ | |
72d080a8 | 102 | --x-libraries=/usr/X11R6/%{_lib} \ |
85f82bec AF |
103 | } |
104 | ||
617b7266 | 105 | # ------------------------------------------------------------------------ |
a0bade1c AM |
106 | # Overloading of some basic macros |
107 | %prep \ | |
108 | %%prep\ | |
109 | LANG=C\ | |
110 | export LANG\ | |
7febf367 | 111 | unset DISPLAY ||:\ |
a0bade1c AM |
112 | %{nil} |
113 | ||
114 | %build %%build\ | |
115 | LANG=C\ | |
116 | export LANG\ | |
7febf367 | 117 | unset DISPLAY ||:\ |
a0bade1c AM |
118 | %{nil} |
119 | ||
120 | %install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\ | |
121 | %%install\ | |
122 | LANG=C\ | |
123 | export LANG\ | |
7febf367 | 124 | unset DISPLAY ||:\ |
a0bade1c AM |
125 | %{nil} |
126 | ||
127 | # ------------------------------------------------------------------------ | |
617b7266 MM |
128 | # Conditional build stuff. |
129 | ||
130 | # Check if symbol is defined. | |
131 | # Example usage: %if %{defined with_foo} && %{undefined with_bar} ... | |
132 | %defined() %{expand:%%{?%{1}:1}%%{!?%{1}:0}} | |
133 | %undefined() %{expand:%%{?%{1}:0}%%{!?%{1}:1}} | |
134 | ||
ed4f631a MM |
135 | # Shorthand for %{defined with_...} |
136 | %with() %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}} | |
137 | %without() %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}} | |
138 | ||
617b7266 MM |
139 | # Handle conditional builds. %bcond_with is for case when feature is |
140 | # default off and needs to be activated with --with ... command line | |
141 | # switch. %bcond_without is for the dual case. | |
142 | # | |
143 | # %bcond_with foo defines symbol with_foo if --with foo was specified on | |
144 | # command line. | |
145 | # %bcond_without foo defines symbol with_foo if --without foo was *not* | |
146 | # specified on command line. | |
147 | # | |
148 | # For example: | |
149 | # | |
150 | # %bcond_with extra_fonts | |
151 | # %bcond_without static | |
d823b3fb | 152 | # %if %{with extra_fonts} |
617b7266 MM |
153 | # ... |
154 | # %endif | |
d823b3fb | 155 | # %ifdef %{with static} |
617b7266 MM |
156 | # ... |
157 | # %endif | |
158 | # %{?with_static: ... } | |
159 | # %{!?with_static: ... } | |
160 | # %{?with_extra_fonts: ... } | |
161 | # %{!?with_extra_fonts: ... } | |
162 | # | |
163 | # The bottom line: never use without_foo, _with_foo nor _without_foo, only | |
164 | # with_foo. This way changing default set of bconds for given spec is just | |
165 | # a matter of changing single line in it and syntax is more readable. | |
166 | %bcond_with() %{expand:%%{?_with_%{1}:%%global with_%{1} 1}} | |
167 | %bcond_without() %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}} | |
168 | # ------------------------------------------------------------------------ | |
169 | ||
cd33aab7 AM |
170 | # Location of autoconf macros |
171 | %_aclocaldir %(aclocal --print-ac-dir) | |
172 | ||
32720a50 AM |
173 | # Location of omf files |
174 | %_omf_dest_dir %(scrollkeeper-config --omfdir) | |
175 | ||
c5eece2c | 176 | # Location of pkgconfig files |
a46897a7 | 177 | %_pkgconfigdir /usr/%{_lib}/pkgconfig |
c5eece2c | 178 | |
cd33aab7 | 179 | # Location of top applink dir |
de0caa47 | 180 | %_applnkdir /usr/X11R6/share/applnk |
cd33aab7 | 181 | |
c917274d | 182 | # Location of desktop files |
183 | %_desktopdir /usr/share/applications | |
184 | ||
fb08fb4a | 185 | # Location of pixmaps for applnk/desktop files |
3a9bb008 | 186 | %_pixmapsdir /usr/share/pixmaps |
cd33aab7 | 187 | |
fb08fb4a | 188 | # Location of themable icons for applnk/desktop files |
986c3bcd | 189 | %_iconsdir /usr/share/icons |
190 | ||
c5eece2c JB |
191 | # Location of fonts directories |
192 | %_fontsdir /usr/share/fonts | |
193 | ||
5cfcbc9e | 194 | # Location of Gtk and associated libraries documentation |
e9f33a26 | 195 | %_gtkdocdir %{_defaultdocdir}/gtk-doc/html |
5cfcbc9e | 196 | |
eee08b2d | 197 | # Location of KDE documentation |
198 | %_kdedocdir %{_defaultdocdir}/kde/HTML | |
199 | ||
cd33aab7 AM |
200 | # Current date |
201 | %date %(LC_ALL="C" date +"%a %b %d %Y") | |
202 | ||
203 | # tmp directory | |
204 | %tmpdir %(echo "${TMPDIR:-/tmp}") | |
205 | ||
206 | # Example files, programs, scripts... | |
207 | %_examplesdir /usr/src/examples | |
208 | ||
bd63739a | 209 | # The directory holding Linux kernel sources |
210 | %_kernelsrcdir /usr/src/linux | |
211 | ||
cd33aab7 | 212 | # If non-empty "debug" macro defined, add "dbg" suffix to release number |
5b0f0ac9 | 213 | %_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}%{?debug:dbg}.%%{ARCH}.rpm |
cd33aab7 | 214 | |
5b0f0ac9 MM |
215 | # Requires name = version-release |
216 | %requires_releq() %(LC_ALL="C" echo '%*' | xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}-%%{release}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not") | |
217 | %requires_releq_kernel_up() %(LC_ALL="C" rpm -qf --qf 'Prereq: kernel-up = %%{epoch}:%%{version}-%%{release}\\n' %{_kernelsrcdir}/include/linux/version.h | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -vE "(is not|no such)") | |
218 | %requires_releq_kernel_smp() %(LC_ALL="C" rpm -qf --qf 'Prereq: kernel-smp = %%{epoch}:%%{version}-%%{release}\\n' %{_kernelsrcdir}/include/linux/version.h | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -vE "(is not|no such)") | |
e21c1bea | 219 | %requires_eq_to() %(LC_ALL="C" rpm -q --qf 'Requires: %1 = %%{epoch}:%%{version}\\n' %2 | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not") |
e478b9e7 | 220 | |
6f3d2288 | 221 | %apache_modules_api %(awk '/#define MODULE_MAGIC_NUMBER_MAJOR/ {print $3}' /usr/include/apache/ap_mmn.h 2>/dev/null || echo ERROR) |
8dea1306 | 222 | |
223 | # kernel version-release handling | |
1d969cf0 AM |
224 | %__kernel_ver %([ -f %{_kernelsrcdir}/include/linux/version.h ] && (grep UTS_RELEASE %{_kernelsrcdir}/include/linux/version.h 2>/dev/null | cut -d'"' -f2) || (awk '/^VERSION/ { ver = $0; gsub(/VERSION.*=/, NIL, ver); } /^PATCHLEVEL/ { plev = $0; gsub(/PATCHLEVEL.*=/, NIL, plev); } /^SUBLEVEL/ { slev = $0; gsub(/SUBLEVEL.*=/, NIL, slev); } END { printf("%d.%d.%d", ver, plev, slev); }' %{_kernelsrcdir}/Makefile 2> /dev/null)) |
225 | %__kernel_rel %(LC_ALL="C" rpm -qf %{_kernelsrcdir}/include/linux/fs.h --queryformat "%{RELEASE}" | grep -v "is not") | |
8dea1306 | 226 | %_kernel_ver %(echo %{__kernel_ver}%{!?_without_dist_kernel:-%{__kernel_rel}}) |
227 | %_kernel_ver_str %(echo %{_kernel_ver} | sed s/-/_/g) | |
fd4d8ee0 | 228 | |
c2c27a5a | 229 | # sgml macros |
230 | %xmlcat_add() /usr/bin/xmlcatalog --noout --add nextCatalog \"\" %1 /etc/xml/catalog | |
231 | %xmlcat_del() /usr/bin/xmlcatalog --noout --del %1 /etc/xml/catalog | |
232 | %xmlcat_add_rewrite /usr/bin/xmlcatalog --noout --add rewriteSystem | |
233 | %xmlcat_create() /usr/bin/xmlcatalog --noout --create %1 | |
234 | %sgmlcat_add() /usr/bin/install-catalog --add %1 %2 > /dev/null | |
235 | %sgmlcat_del() /usr/bin/install-catalog --remove %1 %2 > /dev/null | |
236 | %docbook_sgmlcat_fix() { for l in \ | |
237 | '' \ | |
238 | ' -- default decl --' \ | |
239 | 'DTDDECL "-//OASIS//DTD DocBook XML V%2//EN" "../../xml.dcl"' \ | |
240 | ' -- hacks for opensp --' \ | |
241 | 'SYSTEM "file://%{_datadir}/sgml/docbook/xml-dtd-%2/docbookx.dtd" "%{_datadir}/sgml/docbook/xml-dtd-%2/docbookx.dtd"' \ | |
242 | 'SYSTEM "http://www.oasis-open.org/docbook/xml/%2/docbookx.dtd" "%{_datadir}/sgml/docbook/xml-dtd-%2/docbookx.dtd"' \ | |
243 | '' \ | |
244 | ; do echo $l; done >> %1 \ | |
245 | } | |
246 | ||
cd33aab7 AM |
247 | #----------------------------------------------------------------- |
248 | # find and gzip all files in %{_mandir} and %{infodir} | |
249 | # | |
250 | # Requires: xargs, find | |
251 | # | |
252 | #%no_install_post_compress_docs 1 | |
253 | %__spec_install_post_compress_docs { \ | |
cd33aab7 | 254 | %{!?no_install_post_compress_docs: \ |
89f18684 | 255 | echo "Compress man and info pages."; \ |
cd33aab7 AM |
256 | %{?verbose:set -x;} \ |
257 | for i in /usr/share/man /usr/X11R6/man /usr/share/info; do \ | |
258 | if [ -d "$RPM_BUILD_ROOT$i" ]; then \ | |
259 | find "$RPM_BUILD_ROOT$i" -name \*.bz2 -print | xargs -r %{__bzip2} -df; \ | |
260 | find "$RPM_BUILD_ROOT$i" -name \*.gz -print | xargs -r %{__gzip} -dnf; \ | |
261 | find "$RPM_BUILD_ROOT$i" -type f -print | xargs -r %{__gzip} -9nf; \ | |
262 | fi; \ | |
263 | done; \ | |
264 | } } | |
265 | ||
266 | #----------------------------------------------------------------- | |
267 | # Strip executable binaries and shared object files | |
268 | # | |
269 | # Requires: find, awk, strip, cut, xargs | |
270 | # | |
271 | #%no_install_post_strip 1 | |
272 | %__spec_install_post_strip {%{!?debug: \ | |
273 | %{!?no_install_post_strip: \ | |
f80cefa3 JB |
274 | %{?verbose:set -x;} \ |
275 | if [ -d "$RPM_BUILD_ROOT" ]; then \ | |
5b0f0ac9 | 276 | echo "Strip executable binaries, archives and shared object files."; \ |
aaa1486f | 277 | filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*" %{?_noautostrip:! -regex "%{_noautostrip}"}`; \ |
cd33aab7 AM |
278 | elfexelist=`echo $filelist | xargs -r file | \ |
279 | awk '/ELF.*executable/ {print $1}' | cut -d: -f1`; \ | |
280 | elfsharedlist=`echo $filelist | xargs -r file | \ | |
281 | awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \ | |
5b0f0ac9 MM |
282 | elfarchiveslist=`echo $filelist | xargs -r file | \ |
283 | awk '/current ar archive/ {print $1}' | cut -d: -f1`; \ | |
cd33aab7 | 284 | if [ -n "$elfexelist" ]; then \ |
aaa1486f | 285 | %{__strip} --remove-section=.note --remove-section=.comment $elfexelist; \ |
cd33aab7 AM |
286 | fi; \ |
287 | if [ -n "$elfsharedlist" ]; then \ | |
aaa1486f | 288 | %{__strip} --strip-unneeded --remove-section=.note --remove-section=.comment $elfsharedlist; \ |
5b0f0ac9 MM |
289 | fi; \ |
290 | if [ -n "$elfarchiveslist" ]; then \ | |
aaa1486f | 291 | %{__strip} --strip-debug --remove-section=.note --remove-section=.comment $elfarchiveslist; \ |
f80cefa3 JB |
292 | fi; \ |
293 | fi; } \ | |
cd33aab7 | 294 | } } |
cc545e1a | 295 | #----------------------------------------------------------------- |
296 | # remove all RPATH from executable binaries and shared object files | |
297 | # | |
298 | # Requires: find, awk, cut, xargs, chrpath, uname | |
299 | # | |
300 | #%no_install_post_chrpath 1 | |
301 | %__spec_install_post_chrpath {%{!?debug: \ | |
302 | %{!?no_install_post_chrpath: \ | |
303 | %{?verbose:set -x;} \ | |
f80cefa3 | 304 | if [ -d "$RPM_BUILD_ROOT" ]; then \ |
cc545e1a | 305 | echo "Remove RPATH from executable binaries and shared object files."; \ |
aaa1486f | 306 | find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*" %{?_noautochrpath:! -regex "%{_noautochrpath}"} | xargs -r file | \ |
cc545e1a | 307 | awk '/ELF.*(executable|shared object)/ {print $1}' | cut -d: -f1 | \ |
308 | while read file ; do \ | |
309 | rpath= ; \ | |
310 | chmod u+w "$file"; \ | |
311 | for dir in `chrpath -l "$file" | \ | |
312 | awk '/RPATH=/ { gsub(/.*RPATH=/,""); gsub(/:/," "); print $0 }'` ; do \ | |
313 | case $dir in \ | |
570a0c29 | 314 | /home/* | /tmp/* | /usr/lib | /usr/lib64 | /lib | /lib64 | /usr/local/lib | /usr/local/lib64 | /usr/X11R6/lib | /usr/X11R6/lib64 ) \ |
cc545e1a | 315 | echo "remove-rpath: $dir in $file"; \ |
316 | ;; \ | |
317 | * ) \ | |
318 | if [ "$rpath" = "" ] ; then rpath="$dir" ; \ | |
319 | else rpath="$rpath:$dir" ; fi ; \ | |
320 | ;; \ | |
321 | esac ; \ | |
322 | done ; \ | |
323 | if [ "$rpath" = "" ] ; then chrpath -d "$file" > /dev/null ; \ | |
324 | else chrpath -r "$rpath" "$file" > /dev/null ; fi ; \ | |
f80cefa3 JB |
325 | done; \ |
326 | fi; } \ | |
cc545e1a | 327 | } } |
22a54b3e | 328 | #----------------------------------------------------------------- |
93b46c00 | 329 | # Find and gzip all kernel modules |
330 | # | |
331 | # Requires: find | |
332 | # | |
333 | #%no_install_post_compress_modules 1 | |
334 | %__spec_install_post_compress_modules { \ | |
93b46c00 | 335 | %{!?no_install_post_compress_modules: \ |
336 | %{?verbose:set -x;} \ | |
f80cefa3 JB |
337 | if [ -d "$RPM_BUILD_ROOT" ]; then \ |
338 | echo "Compress kernel modules if any."; \ | |
390bdd1d | 339 | if test -d $RPM_BUILD_ROOT/lib/modules ; then \ |
fe70546d | 340 | find $RPM_BUILD_ROOT/lib/modules -name \*o -type f -print | \ |
390bdd1d | 341 | xargs -r %{__gzip} -9nf; \ |
fe70546d | 342 | find $RPM_BUILD_ROOT/lib/modules -name \*o -type l -printf "%p %l\n" | \ |
92ebeb8d | 343 | while read a b; do ln -sf $b.gz $a.gz; rm -f $a; done; \ |
390bdd1d | 344 | fi; \ |
f80cefa3 | 345 | fi; \ |
93b46c00 | 346 | } } |
cd33aab7 AM |
347 | |
348 | %_source_payload w9.gzdio | |
349 | %_binary_payload w9.bzdio | |
350 | ||
aad1c8e4 | 351 | #----------------------------------------------------------------- |
352 | # Update all GConf2 schemas | |
353 | # | |
354 | # Requires: GConf2 | |
355 | # | |
03ff3333 | 356 | %gconf_schema_install { umask 022; \ |
357 | GCONF_CONFIG_SOURCE="xml:readwrite:/etc/gconf/gconf.xml.defaults" \ | |
358 | /usr/bin/gconftool-2 --makefile-install-rule \ | |
359 | /etc/gconf/schemas/*.schemas > /dev/null \ | |
82b097b9 | 360 | } |
aad1c8e4 | 361 | |
cd33aab7 AM |
362 | #----------------------------------------------------------------- |
363 | # post %install sequence: | |
364 | # - autodeps exceptions | |
365 | # - compress all man and info pages, | |
366 | # - strip all ELF executables and ELF shared objects if not %debug. | |
5b0f0ac9 | 367 | # - compress kernel modules if any |
cd33aab7 AM |
368 | |
369 | ################################################################### | |
370 | # Requires/Provides automation | |
371 | # exceptions system by Jacek Konieczny <jajcus@pld.org.pl> | |
a4852742 | 372 | # |
9123f215 JK |
373 | %_noautoreqfiles %(sed -e s'/#.*//' /etc/rpm/noautoreqfiles) |
374 | %_noautoprovfiles %(sed -e s'/#.*//' /etc/rpm/noautoprovfiles) | |
984f6de6 | 375 | %_noautoreq %(sed -e s'/#.*//' /etc/rpm/noautoreq) |
23183011 | 376 | %_noautoreqdep %(sed -e s'/#.*//' /etc/rpm/noautoreqdep) |
984f6de6 | 377 | %_noautoprov %(sed -e s'/#.*//' /etc/rpm/noautoprov) |
a4852742 JB |
378 | #%_noautocompressdoc %{nil} |
379 | # | |
5b0f0ac9 MM |
380 | %_missing_doc_files_terminate_build 1%{nil} |
381 | %_unpackaged_files_terminate_build %{nil} | |
4c7d3ba4 | 382 | # (X)emacs support |
42b7e5ac | 383 | %___emacs_lispdir_helper -batch -q -eval '(while load-path (princ (concat (car load-path) "\\n")) (setq load-path (cdr load-path)))' 2> /dev/null|sed -n '/\\(.*\\/x\\?emacs\\/site-lisp\\)\\/\\?$/{s,,\\1,p;q;}' |
4c7d3ba4 AF |
384 | %_emacs_lispdir %(emacs %___emacs_lispdir_helper) |
385 | %_xemacs_lispdir %(xemacs %___emacs_lispdir_helper) | |
41a62699 | 386 | |
984f6de6 JK |
387 | %__php_provides %{nil} |
388 | %__php_requires %{nil} | |
389 | %__perl_provides %{nil} | |
390 | %__perl_requires %{nil} | |
41a62699 AF |
391 | |
392 | # Perl specific macro definitions. | |
942c693c AF |
393 | %perl_privlib %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib) |
394 | %perl_archlib %(eval "`%{__perl} -V:installarchlib`"; echo $installarchlib) | |
395 | %perl_vendorlib %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib) | |
396 | %perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch) | |
397 | %perl_sitelib %(eval "`%{__perl} -V:installsitelib`"; echo $installsitelib) | |
398 | %perl_sitearch %(eval "`%{__perl} -V:installsitearch`"; echo $installsitearch) | |
41a62699 | 399 | |
942c693c | 400 | %php_pear_dir %{_datadir}/pear |
41a62699 AF |
401 | |
402 | # Python specific macro definitions. | |
403 | # python main version | |
942c693c | 404 | %py_ver %(echo `python -c "import sys; print sys.version[:3]"`) |
41a62699 AF |
405 | |
406 | # directories | |
942c693c | 407 | %py_prefix %(echo `python -c "import sys; print sys.prefix"`) |
4ef692e4 | 408 | %py_libdir %{py_prefix}/%{_lib}/python%{py_ver} |
a4f0b5e0 | 409 | %py_scriptdir %{py_prefix}/share/python%{py_ver} |
942c693c | 410 | %py_incdir /usr/include/python%{py_ver} |
a4f0b5e0 JK |
411 | %py_sitedir %{py_libdir}/site-packages |
412 | %py_sitescriptdir %{py_scriptdir}/site-packages | |
942c693c | 413 | %py_dyndir %{py_libdir}/lib-dynload |
41a62699 AF |
414 | |
415 | # pure python modules compilation | |
942c693c | 416 | %py_comp python -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])" |
41a62699 | 417 | |
942c693c | 418 | %py_ocomp python -O -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])" |
41a62699 AF |
419 | |
420 | # Software written in Python language require Python with main version | |
421 | # unchanged | |
7986b123 | 422 | %pyrequires_eq() Requires: %1 >= 1:%py_ver %1 < 1:%(echo `python -c "import sys; import string; ver=sys.version[:3].split('.'); ver[1]=str(int(ver[1])+1); print string.join(ver, '.')"`) |
41a62699 | 423 | |
67ed5b97 | 424 | # depmod macro |
425 | %depmod() { \ | |
426 | if [ -e /boot/System.map-%1 ]; then \ | |
427 | /sbin/depmod -a -F /boot/System.map-%1 %1; \ | |
428 | else \ | |
429 | if [ -e /boot/System.map ]; then \ | |
430 | /sbin/depmod -a -F /boot/System.map %1; \ | |
431 | else \ | |
432 | /sbin/depmod -a %1; \ | |
433 | fi \ | |
434 | fi; \ | |
435 | } | |
436 | ||
495892af | 437 | # XMMS specific macros |
2f163afd JB |
438 | %xmms_prefix %(xmms-config --prefix) |
439 | %xmms_exec_prefix %(xmms-config --exec-prefix) | |
440 | %xmms_version %(xmms-config --version) | |
441 | %xmms_datadir %(xmms-config --data-dir) | |
442 | %xmms_plugindir %(xmms-config --plugin-dir) | |
443 | %xmms_visualization_plugindir %(xmms-config --visualization-plugin-dir) | |
444 | %xmms_input_plugindir %(xmms-config --input-plugin-dir) | |
445 | %xmms_output_plugindir %(xmms-config --output-plugin-dir) | |
446 | %xmms_effect_plugindir %(xmms-config --effect-plugin-dir) | |
447 | %xmms_general_plugindir %(xmms-config --general-plugin-dir) | |
495892af | 448 | |
59d9979d | 449 | %_target_base_arch %(echo %{_target_cpu} | sed 's/i.86/i386/;s/athlon/i386/;s/pentium./i386/;s/amd64/x86_64/') |