]>
Commit | Line | Data |
---|---|---|
d54662bf AF |
1 | # PLD rpm macros |
2 | ||
8f74418b MM |
3 | %__id @__ID@ |
4 | %__id_u %{__id} -u | |
5 | %__chown_Rhf @__CHOWN_RHF@ | |
6 | %__chgrp_Rhf @__CHGRP_RHF@ | |
7 | ||
d54662bf AF |
8 | %_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root.@ROOT_GROUP@ |
9 | %_fixgroup true | |
8f74418b | 10 | %_fixperms %{__chmod} -Rf @FIXPERMS@ |
d54662bf | 11 | %_topdir %(echo $HOME)/rpm |
9c404149 AM |
12 | #----------------------------------------------------------------- |
13 | # CFLAGS and LDFLAGS used to build | |
14 | ||
8f74418b | 15 | %debugcflags -O0 -g -Wall |
9c404149 AM |
16 | %rpmcflags %{?debug:%debugcflags}%{!?debug:%optflags} |
17 | %rpmldflags %{!?debug:-s} | |
18 | ||
ba1fdedc | 19 | # kernel compiler |
d2e1bc22 | 20 | %kgcc gcc |
21 | %kgcc_package gcc | |
ba1fdedc | 22 | |
33040789 | 23 | # Build system path macros. |
24 | # | |
25 | %__libtoolize libtoolize --copy --force | |
83094b62 | 26 | %__gettextize { \ |
afff6d37 | 27 | if ! gettextize --version | grep -q '0\.10\.' ; then \ |
8a995cff JB |
28 | if grep -qs 'AM_GNU_GETTEXT.*external' configure.{ac,in} ; then \ |
29 | gettextize --copy --force --no-changelog; \ | |
97589b6e | 30 | else \ |
8a995cff 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; \ | |
83094b62 | 38 | fi; \ |
8a995cff JB |
39 | } |
40 | %__autopoint autopoint --force | |
bcdab9c2 | 41 | %__automake automake -a -c -f --foreign |
be3a1985 | 42 | %__autoconf autoconf %{?debug:-Wall} |
33040789 | 43 | |
9c404149 | 44 | #----------------------------------------------------------------- |
9f4ce098 | 45 | %configure2_13 { \ |
9c404149 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 ; \ | |
8ec1a12b | 51 | CPPFLAGS="${CPPFLAGS:-}" ; export CPPFLAGS ; \ |
ae5d93df AM |
52 | %{?__cc:CC=%{__cc} ; export CC ; } \ |
53 | %{?__cxx:CXX=%{__cxx} ; export CXX ; } \ | |
8f74418b | 54 | %{?configuredir:%{configuredir}}%{!?configuredir:.}/configure \ |
2a7cfd3f | 55 | --host=%{_target_platform} \ |
9c404149 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 | ||
4a6b0d54 | 71 | #---------------------------------------------------------------- |
57f4166d | 72 | %configure {./configure \ |
4a6b0d54 AF |
73 | LDFLAGS="${LDFLAGS:-%rpmldflags}" \ |
74 | CFLAGS="${CFLAGS:-%rpmcflags}" \ | |
75 | CXXFLAGS="${CXXFLAGS:-%rpmcflags}" \ | |
76 | FFLAGS="${FFLAGS:-%rpmcflags}" \ | |
a2bd5992 | 77 | CPPFLAGS="${CPPFLAGS:-}" \ |
9f4ce098 AF |
78 | %{?__cc:CC=%{__cc}} \ |
79 | %{?__cxx:CXX=%{__cxx}} \ | |
4a6b0d54 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 | ||
7dbab518 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 | ||
566fa098 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 | ||
7dbab518 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 | |
f52f9976 | 121 | # %if %{with extra_fonts} |
7dbab518 MM |
122 | # ... |
123 | # %endif | |
f52f9976 | 124 | # %ifdef %{with static} |
7dbab518 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 | ||
9c404149 AM |
139 | # Location of autoconf macros |
140 | %_aclocaldir %(aclocal --print-ac-dir) | |
141 | ||
e2804f99 AM |
142 | # Location of omf files |
143 | %_omf_dest_dir %(scrollkeeper-config --omfdir) | |
144 | ||
e987a186 | 145 | # Location of pkgconfig files |
d7021551 | 146 | %_pkgconfigdir /usr/lib/pkgconfig |
e987a186 | 147 | |
9c404149 | 148 | # Location of top applink dir |
30562d7e | 149 | %_applnkdir /usr/X11R6/share/applnk |
9c404149 | 150 | |
486b0b5f | 151 | # Location of desktop files |
152 | %_desktopdir /usr/share/applications | |
153 | ||
481463e9 | 154 | # Location of pixmaps for applnk/desktop files |
e1f0a822 | 155 | %_pixmapsdir /usr/share/pixmaps |
9c404149 | 156 | |
481463e9 | 157 | # Location of themable icons for applnk/desktop files |
b36c8e2a | 158 | %_iconsdir /usr/share/icons |
159 | ||
e987a186 JB |
160 | # Location of fonts directories |
161 | %_fontsdir /usr/share/fonts | |
162 | ||
b3282f3f | 163 | # Location of Gtk and associated libraries documentation |
6eed6d84 | 164 | %_gtkdocdir %{_defaultdocdir}/gtk-doc/html |
b3282f3f | 165 | |
fc4d7771 | 166 | # Location of KDE documentation |
167 | %_kdedocdir %{_defaultdocdir}/kde/HTML | |
168 | ||
9c404149 AM |
169 | # Current date |
170 | %date %(LC_ALL="C" date +"%a %b %d %Y") | |
171 | ||
172 | # tmp directory | |
173 | %tmpdir %(echo "${TMPDIR:-/tmp}") | |
174 | ||
175 | # Example files, programs, scripts... | |
176 | %_examplesdir /usr/src/examples | |
177 | ||
8377d27d | 178 | # The directory holding Linux kernel sources |
179 | %_kernelsrcdir /usr/src/linux | |
180 | ||
9c404149 | 181 | # If non-empty "debug" macro defined, add "dbg" suffix to release number |
8f74418b | 182 | %_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}%{?debug:dbg}.%%{ARCH}.rpm |
9c404149 | 183 | |
8f74418b MM |
184 | # Requires name = version-release |
185 | %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") | |
186 | %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)") | |
187 | %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)") | |
01a9f990 AF |
188 | %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") |
189 | ||
be115a4f | 190 | %apache_modules_api %(awk '/#define MODULE_MAGIC_NUMBER_MAJOR/ {print $3}' /usr/include/apache/ap_mmn.h) |
b9d5d440 | 191 | |
192 | # kernel version-release handling | |
193 | %__kernel_ver %(grep UTS_RELEASE %{_kernelsrcdir}/include/linux/version.h 2>/dev/null | cut -d'"' -f2) | |
194 | %__kernel_rel %(LC_ALL="C" rpm -qf %{_kernelsrcdir}/include/linux/version.h --queryformat "%{RELEASE}" | grep -v "is not") | |
195 | %_kernel_ver %(echo %{__kernel_ver}%{!?_without_dist_kernel:-%{__kernel_rel}}) | |
196 | %_kernel_ver_str %(echo %{_kernel_ver} | sed s/-/_/g) | |
87be1cf0 | 197 | |
e00dd7f6 | 198 | # sgml macros |
199 | %xmlcat_add() /usr/bin/xmlcatalog --noout --add nextCatalog \"\" %1 /etc/xml/catalog | |
200 | %xmlcat_del() /usr/bin/xmlcatalog --noout --del %1 /etc/xml/catalog | |
201 | %xmlcat_add_rewrite /usr/bin/xmlcatalog --noout --add rewriteSystem | |
202 | %xmlcat_create() /usr/bin/xmlcatalog --noout --create %1 | |
203 | %sgmlcat_add() /usr/bin/install-catalog --add %1 %2 > /dev/null | |
204 | %sgmlcat_del() /usr/bin/install-catalog --remove %1 %2 > /dev/null | |
205 | %docbook_sgmlcat_fix() { for l in \ | |
206 | '' \ | |
207 | ' -- default decl --' \ | |
208 | 'DTDDECL "-//OASIS//DTD DocBook XML V%2//EN" "../../xml.dcl"' \ | |
209 | ' -- hacks for opensp --' \ | |
210 | 'SYSTEM "file://%{_datadir}/sgml/docbook/xml-dtd-%2/docbookx.dtd" "%{_datadir}/sgml/docbook/xml-dtd-%2/docbookx.dtd"' \ | |
211 | 'SYSTEM "http://www.oasis-open.org/docbook/xml/%2/docbookx.dtd" "%{_datadir}/sgml/docbook/xml-dtd-%2/docbookx.dtd"' \ | |
212 | '' \ | |
213 | ; do echo $l; done >> %1 \ | |
214 | } | |
215 | ||
9c404149 AM |
216 | #----------------------------------------------------------------- |
217 | # find and gzip all files in %{_mandir} and %{infodir} | |
218 | # | |
219 | # Requires: xargs, find | |
220 | # | |
221 | #%no_install_post_compress_docs 1 | |
222 | %__spec_install_post_compress_docs { \ | |
223 | echo "Compress man and info pages."; \ | |
224 | %{!?no_install_post_compress_docs: \ | |
225 | %{?verbose:set -x;} \ | |
226 | for i in /usr/share/man /usr/X11R6/man /usr/share/info; do \ | |
227 | if [ -d "$RPM_BUILD_ROOT$i" ]; then \ | |
228 | find "$RPM_BUILD_ROOT$i" -name \*.bz2 -print | xargs -r %{__bzip2} -df; \ | |
229 | find "$RPM_BUILD_ROOT$i" -name \*.gz -print | xargs -r %{__gzip} -dnf; \ | |
230 | find "$RPM_BUILD_ROOT$i" -type f -print | xargs -r %{__gzip} -9nf; \ | |
231 | fi; \ | |
232 | done; \ | |
233 | } } | |
234 | ||
235 | #----------------------------------------------------------------- | |
236 | # Strip executable binaries and shared object files | |
237 | # | |
238 | # Requires: find, awk, strip, cut, xargs | |
239 | # | |
240 | #%no_install_post_strip 1 | |
241 | %__spec_install_post_strip {%{!?debug: \ | |
242 | %{!?no_install_post_strip: \ | |
243 | %{?verbose:set -x;} \ | |
8f74418b | 244 | echo "Strip executable binaries, archives and shared object files."; \ |
9c404149 AM |
245 | filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`; \ |
246 | elfexelist=`echo $filelist | xargs -r file | \ | |
247 | awk '/ELF.*executable/ {print $1}' | cut -d: -f1`; \ | |
248 | elfsharedlist=`echo $filelist | xargs -r file | \ | |
249 | awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \ | |
8f74418b MM |
250 | elfarchiveslist=`echo $filelist | xargs -r file | \ |
251 | awk '/current ar archive/ {print $1}' | cut -d: -f1`; \ | |
9c404149 AM |
252 | if [ -n "$elfexelist" ]; then \ |
253 | strip --remove-section=.note --remove-section=.comment $elfexelist; \ | |
254 | fi; \ | |
255 | if [ -n "$elfsharedlist" ]; then \ | |
256 | strip --strip-unneeded --remove-section=.note --remove-section=.comment $elfsharedlist; \ | |
8f74418b MM |
257 | fi; \ |
258 | if [ -n "$elfarchiveslist" ]; then \ | |
259 | strip --strip-debug --remove-section=.note --remove-section=.comment $elfarchiveslist; \ | |
9c404149 AM |
260 | fi; } \ |
261 | } } | |
fc5d7e20 | 262 | #----------------------------------------------------------------- |
263 | # remove all RPATH from executable binaries and shared object files | |
264 | # | |
265 | # Requires: find, awk, cut, xargs, chrpath, uname | |
266 | # | |
267 | #%no_install_post_chrpath 1 | |
268 | %__spec_install_post_chrpath {%{!?debug: \ | |
269 | %{!?no_install_post_chrpath: \ | |
270 | %{?verbose:set -x;} \ | |
271 | echo "Remove RPATH from executable binaries and shared object files."; \ | |
272 | if [ "$(uname -m)" != alpha ] ; then \ | |
273 | find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*" | xargs -r file | \ | |
274 | awk '/ELF.*(executable|shared object)/ {print $1}' | cut -d: -f1 | \ | |
275 | while read file ; do \ | |
276 | rpath= ; \ | |
277 | chmod u+w "$file"; \ | |
278 | for dir in `chrpath -l "$file" | \ | |
279 | awk '/RPATH=/ { gsub(/.*RPATH=/,""); gsub(/:/," "); print $0 }'` ; do \ | |
280 | case $dir in \ | |
281 | /home/* | /tmp/* | /usr/lib | /lib | /usr/local/lib | /usr/X11R6/lib ) \ | |
282 | echo "remove-rpath: $dir in $file"; \ | |
283 | ;; \ | |
284 | * ) \ | |
285 | if [ "$rpath" = "" ] ; then rpath="$dir" ; \ | |
286 | else rpath="$rpath:$dir" ; fi ; \ | |
287 | ;; \ | |
288 | esac ; \ | |
289 | done ; \ | |
290 | if [ "$rpath" = "" ] ; then chrpath -d "$file" > /dev/null ; \ | |
291 | else chrpath -r "$rpath" "$file" > /dev/null ; fi ; \ | |
292 | done; fi; } \ | |
293 | } } | |
d72c185f | 294 | #----------------------------------------------------------------- |
ccb8ae8d | 295 | # Find and gzip all kernel modules |
296 | # | |
297 | # Requires: find | |
298 | # | |
299 | #%no_install_post_compress_modules 1 | |
300 | %__spec_install_post_compress_modules { \ | |
ccb8ae8d | 301 | %{!?no_install_post_compress_modules: \ |
fc1ea397 | 302 | echo "Compress kernel modules if any."; \ |
ccb8ae8d | 303 | %{?verbose:set -x;} \ |
d618340e | 304 | if test -d $RPM_BUILD_ROOT/lib/modules ; then \ |
fc1ea397 | 305 | find $RPM_BUILD_ROOT/lib/modules -name \*.o -type f -print | \ |
d618340e | 306 | xargs -r %{__gzip} -9nf; \ |
fc1ea397 | 307 | find $RPM_BUILD_ROOT/lib/modules -name \*.o -type l -printf "%p %l\n" | \ |
03b234a5 | 308 | while read a b; do ln -sf $b.gz $a.gz; rm -f $a; done; \ |
d618340e | 309 | fi; \ |
ccb8ae8d | 310 | } } |
9c404149 AM |
311 | |
312 | %_source_payload w9.gzdio | |
313 | %_binary_payload w9.bzdio | |
314 | ||
83094b62 | 315 | #----------------------------------------------------------------- |
316 | # Update all GConf2 schemas | |
317 | # | |
318 | # Requires: GConf2 | |
319 | # | |
7bd8c922 | 320 | %gconf_schema_install { umask 022; \ |
321 | GCONF_CONFIG_SOURCE="xml:readwrite:/etc/gconf/gconf.xml.defaults" \ | |
322 | /usr/bin/gconftool-2 --makefile-install-rule \ | |
323 | /etc/gconf/schemas/*.schemas > /dev/null \ | |
3ee1090a | 324 | } |
83094b62 | 325 | |
9c404149 AM |
326 | #----------------------------------------------------------------- |
327 | # post %install sequence: | |
328 | # - autodeps exceptions | |
329 | # - compress all man and info pages, | |
330 | # - strip all ELF executables and ELF shared objects if not %debug. | |
8f74418b | 331 | # - compress kernel modules if any |
9c404149 AM |
332 | |
333 | ################################################################### | |
334 | # Requires/Provides automation | |
335 | # exceptions system by Jacek Konieczny <jajcus@pld.org.pl> | |
338726a6 JB |
336 | # |
337 | #%_noautoreqfiles '%{_defaultdocdir}.*' '%{_examplesdir}.*' | |
9c404149 AM |
338 | #%_noautoreq %{nil} |
339 | #%_noautoreqdep %{nil} | |
340 | #%_noautoprovfiles %{nil} | |
341 | #%_noautoprov %{nil} | |
338726a6 JB |
342 | #%_noautocompressdoc %{nil} |
343 | # | |
8f74418b MM |
344 | %_missing_doc_files_terminate_build 1%{nil} |
345 | %_unpackaged_files_terminate_build %{nil} | |
8781dc74 | 346 | # (X)emacs support |
d77dcb61 | 347 | %___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;}' |
8781dc74 AF |
348 | %_emacs_lispdir %(emacs %___emacs_lispdir_helper) |
349 | %_xemacs_lispdir %(xemacs %___emacs_lispdir_helper) | |
25043cd4 AF |
350 | |
351 | %__php_provides @RPMCONFIGDIR@/php.prov | |
352 | %__php_requires @RPMCONFIGDIR@/php.req | |
353 | ||
354 | # Perl specific macro definitions. | |
c853f847 AF |
355 | %perl_privlib %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib) |
356 | %perl_archlib %(eval "`%{__perl} -V:installarchlib`"; echo $installarchlib) | |
357 | %perl_vendorlib %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib) | |
358 | %perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch) | |
359 | %perl_sitelib %(eval "`%{__perl} -V:installsitelib`"; echo $installsitelib) | |
360 | %perl_sitearch %(eval "`%{__perl} -V:installsitearch`"; echo $installsitearch) | |
25043cd4 | 361 | |
c853f847 | 362 | %php_pear_dir %{_datadir}/pear |
25043cd4 AF |
363 | |
364 | # Python specific macro definitions. | |
365 | # python main version | |
c853f847 | 366 | %py_ver %(echo `python -c "import sys; print sys.version[:3]"`) |
25043cd4 AF |
367 | |
368 | # directories | |
c853f847 AF |
369 | %py_prefix %(echo `python -c "import sys; print sys.prefix"`) |
370 | %py_libdir %{py_prefix}/lib/python%{py_ver} | |
371 | %py_incdir /usr/include/python%{py_ver} | |
372 | %py_sitedir %{py_libdir}/site-packages | |
373 | %py_dyndir %{py_libdir}/lib-dynload | |
25043cd4 AF |
374 | |
375 | # pure python modules compilation | |
c853f847 | 376 | %py_comp python -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])" |
25043cd4 | 377 | |
c853f847 | 378 | %py_ocomp python -O -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])" |
25043cd4 AF |
379 | |
380 | # Software written in Python language require Python with main version | |
381 | # unchanged | |
c853f847 | 382 | %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, '.')"`) |
25043cd4 | 383 | |
0fc5cff8 | 384 | # depmod macro |
385 | %depmod() { \ | |
386 | if [ -e /boot/System.map-%1 ]; then \ | |
387 | /sbin/depmod -a -F /boot/System.map-%1 %1; \ | |
388 | else \ | |
389 | if [ -e /boot/System.map ]; then \ | |
390 | /sbin/depmod -a -F /boot/System.map %1; \ | |
391 | else \ | |
392 | /sbin/depmod -a %1; \ | |
393 | fi \ | |
394 | fi; \ | |
395 | } | |
396 | ||
2afc6e64 | 397 | # XMMS specific macros |
2d372986 JB |
398 | %xmms_prefix %(xmms-config --prefix) |
399 | %xmms_exec_prefix %(xmms-config --exec-prefix) | |
400 | %xmms_version %(xmms-config --version) | |
401 | %xmms_datadir %(xmms-config --data-dir) | |
402 | %xmms_plugindir %(xmms-config --plugin-dir) | |
403 | %xmms_visualization_plugindir %(xmms-config --visualization-plugin-dir) | |
404 | %xmms_input_plugindir %(xmms-config --input-plugin-dir) | |
405 | %xmms_output_plugindir %(xmms-config --output-plugin-dir) | |
406 | %xmms_effect_plugindir %(xmms-config --effect-plugin-dir) | |
407 | %xmms_general_plugindir %(xmms-config --general-plugin-dir) | |
2afc6e64 | 408 |