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