]> git.pld-linux.org Git - packages/rpm.git/blob - rpm.macros
- don't remove 0 epoch from releq deps
[packages/rpm.git] / rpm.macros
1 # PLD rpm macros
2
3 # other macros
4 %_enable_debug_packages 1
5
6 %__id           @__ID@
7 %__id_u         %{__id} -u 
8 %__chown_Rhf           @__CHOWN_RHF@
9 %__chgrp_Rhf           @__CHGRP_RHF@
10
11 %_fixowner       [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root:@ROOT_GROUP@
12 %_fixgroup       true
13 %_fixperms       %{__chmod} -Rf @FIXPERMS@
14 %_topdir         %(echo $HOME)/rpm
15 #-----------------------------------------------------------------
16 # CFLAGS and LDFLAGS used to build
17
18 %debuginfocflags        %{expand:%%define __dic_%{?_enable_debug_packages} 1}%{?__dic_1: -ggdb}%{expand:%%undefine __dic_%{?_enable_debug_packages}}
19
20 %debugcflags    -O0 -g -Wall
21 %rpmcflags      %{?debug:%debugcflags}%{!?debug:%optflags}%{?debuginfocflags}
22 %rpmcxxflags    %{rpmcflags} -fvisibility-inlines-hidden
23 %rpmldflags     %{nil}
24
25 # kernel compiler
26 %kgcc           gcc
27 %kgcc_package   gcc
28
29 # Build system path macros.
30 #
31 %__libtoolize           libtoolize --copy --force
32 %__gettextize { \
33     if ! gettextize --version | grep -q '0\.10\.' ; then \
34         if grep -qs 'AM_GNU_GETTEXT.*external' configure.{ac,in} ; then \
35             gettextize --copy --force --no-changelog; \
36         else \
37             gettextize --copy --force --no-changelog --intl; \
38         fi; \
39         if [ ! -f po/Makevars ]; then \
40             cp -f po/Makevars{.template,}; \
41         fi; \
42     else \
43         gettextize --copy --force; \
44     fi; \
45 }
46 %__autopoint            autopoint --force
47 %__automake             automake -a -c -f --foreign
48 %__autoconf             autoconf %{?debug:-Wall}
49
50 %dependencytracking     %{nil}
51 #-----------------------------------------------------------------
52 %configure2_13 { \
53  if [ -n "$LINGUAS" ]; then unset LINGUAS; fi; \
54  LDFLAGS="${LDFLAGS:-%rpmldflags}" ; export LDFLAGS ; \
55  CFLAGS="${CFLAGS:-%rpmcflags}" ; export CFLAGS ; \
56  CXXFLAGS="${CXXFLAGS:-%rpmcxxflags}" ; export CXXFLAGS ; \
57  FFLAGS="${FFLAGS:-%rpmcflags}" ; export FFLAGS ; \
58  CPPFLAGS="${CPPFLAGS:-}" ; export CPPFLAGS ; \
59  %{?__cc:CC="%{__cc}" ; export CC ; } \
60  %{?__cxx:CXX="%{__cxx}" ; export CXX ; } \
61  %{?configuredir:%{configuredir}}%{!?configuredir:.}/configure \
62         --host=%{_target_platform} \
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} \
76         --x-libraries=/usr/X11R6/%{_lib} \
77         %{dependencytracking} \
78 }
79
80 #----------------------------------------------------------------
81 %configure {./configure \
82         LDFLAGS="${LDFLAGS:-%rpmldflags}" \
83         CFLAGS="${CFLAGS:-%rpmcflags}" \
84         CXXFLAGS="${CXXFLAGS:-%rpmcxxflags}" \
85         FFLAGS="${FFLAGS:-%rpmcflags}" \
86         CPPFLAGS="${CPPFLAGS:-}" \
87         %{?__cc:CC="%{__cc}"} \
88         %{?__cxx:CXX="%{__cxx}"} \
89         --build=%{_target_platform} \
90         --prefix=%{_prefix} \
91         --exec-prefix=%{_exec_prefix} \
92         --bindir=%{_bindir} \
93         --sbindir=%{_sbindir} \
94         --sysconfdir=%{_sysconfdir} \
95         --datadir=%{_datadir} \
96         --includedir=%{_includedir} \
97         --libdir=%{_libdir} \
98         --libexecdir=%{_libexecdir} \
99         --localstatedir=%{_localstatedir} \
100         --sharedstatedir=%{_sharedstatedir} \
101         --mandir=%{_mandir} \
102         --infodir=%{_infodir} \
103         --x-libraries=/usr/X11R6/%{_lib} \
104         %{dependencytracking} \
105 }
106
107 # ------------------------------------------------------------------------
108 # Overloading of some basic macros
109 %prep \
110 %%prep\
111 LANG=C\
112 export LANG\
113 unset DISPLAY ||:\
114 %{nil}
115
116 %build %%build\
117 LANG=C\
118 export LANG\
119 unset DISPLAY ||:\
120 %{nil}
121
122 %install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\
123 %%install\
124 LANG=C\
125 export LANG\
126 unset DISPLAY ||:\
127 %{nil}
128
129 # ------------------------------------------------------------------------
130 # Conditional build stuff.
131
132 # Check if symbol is defined.
133 # Example usage: %if %{defined with_foo} && %{undefined with_bar} ...
134 %defined()      %{expand:%%{?%{1}:1}%%{!?%{1}:0}}
135 %undefined()    %{expand:%%{?%{1}:0}%%{!?%{1}:1}}
136
137 # Shorthand for %{defined with_...}
138 %with()         %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
139 %without()      %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
140
141 # Handle conditional builds. %bcond_with is for case when feature is
142 # default off and needs to be activated with --with ... command line 
143 # switch. %bcond_without is for the dual case.
144 #
145 # %bcond_with foo defines symbol with_foo if --with foo was specified on
146 # command line.
147 # %bcond_without foo defines symbol with_foo if --without foo was *not* 
148 # specified on command line.
149 #
150 # For example:
151 #
152 # %bcond_with extra_fonts
153 # %bcond_without static
154 # %if %{with extra_fonts}
155 # ...
156 # %endif
157 # %ifdef %{with static}
158 # ...
159 # %endif
160 # %{?with_static: ... }
161 # %{!?with_static: ... }
162 # %{?with_extra_fonts: ... }
163 # %{!?with_extra_fonts: ... }
164
165 # The bottom line: never use without_foo, _with_foo nor _without_foo, only
166 # with_foo. This way changing default set of bconds for given spec is just
167 # a matter of changing single line in it and syntax is more readable.
168 %bcond_with()           %{expand:%%{?_with_%{1}:%%global with_%{1} 1}}
169 %bcond_without()        %{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}
170 # ------------------------------------------------------------------------
171
172 # Location of autoconf macros
173 %_aclocaldir    %(aclocal --print-ac-dir)
174
175 # Location of omf files
176 %_omf_dest_dir  %(scrollkeeper-config --omfdir)
177
178 # Location of pkgconfig files
179 %_pkgconfigdir  /usr/%{_lib}/pkgconfig
180
181 # Location of top applink dir
182 %_applnkdir     /usr/X11R6/share/applnk
183
184 # Location of desktop files
185 %_desktopdir    /usr/share/applications
186
187 # Location of pixmaps for applnk/desktop files
188 %_pixmapsdir    /usr/share/pixmaps
189
190 # Location of themable icons for applnk/desktop files
191 %_iconsdir      /usr/share/icons
192
193 # Location of fonts directories
194 %_fontsdir      /usr/share/fonts
195
196 # Location of Gtk and associated libraries documentation
197 %_gtkdocdir  %{_defaultdocdir}/gtk-doc/html
198
199 # Location of KDE documentation
200 %_kdedocdir  %{_defaultdocdir}/kde/HTML
201
202 # unsermake script
203 %__unsermake /usr/share/unsermake/unsermake
204
205 # Current date
206 %date           %(LC_ALL="C" date +"%a %b %d %Y")
207
208 # tmp directory
209 %tmpdir         %(echo "${TMPDIR:-/tmp}")
210
211 # Example files, programs, scripts...
212 %_examplesdir   /usr/src/examples
213
214 # The directory holding Linux kernel sources
215 %_kernelsrcdir  /usr/src/linux
216
217 # If non-empty "debug" macro defined, add "dbg" suffix to release number
218 %_rpmfilename           %%{NAME}-%%{VERSION}-%%{RELEASE}%{?debug:dbg}.%%{ARCH}.rpm
219
220 # Requires name = version-release
221 %requires_releq()               %(LC_ALL="C" echo '%*' | xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}-%%{release}\\n' | sed -e 's/ (none):/ /' | grep -v "is not")
222
223 %releq_kernel_up()              %(LC_ALL="C" rpm -qf --qf 'kernel-up = %%{epoch}:%%{version}-%%{release}\\n' %{_kernelsrcdir}/include/linux/version.h | sed -e 's/ (none):/ /' | grep -vE "(is not|no such)")
224 %releq_kernel_smp()             %(LC_ALL="C" rpm -qf --qf 'kernel-smp = %%{epoch}:%%{version}-%%{release}\\n' %{_kernelsrcdir}/include/linux/version.h | sed -e 's/ (none):/ /' | grep -vE "(is not|no such)")
225 %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):/ /' | grep -vE "(is not|no such)")
226 %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):/ /' | grep -vE "(is not|no such)")
227
228 %requires_eq_to() %(LC_ALL="C" rpm -q --qf 'Requires: %1 = %%{epoch}:%%{version}\\n' %2 | sed -e 's/ (none):/ /' | grep -v "is not")
229
230 %apache_modules_api %(awk '/#define MODULE_MAGIC_NUMBER_MAJOR/ {print $3}' /usr/include/apache/ap_mmn.h 2>/dev/null || echo ERROR)
231
232 # kernel version-release handling
233 %__kernel_ver   %([ -f %{_kernelsrcdir}/include/linux/version.h ] && (grep UTS_RELEASE %{_kernelsrcdir}/include/linux/version.h 2>/dev/null | head -n 1 | 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); } /^EXTRAVERSION/ { ever = $0; gsub(/EXTRAVERSION.*=/, NIL, ever); gsub(/ /, NIL, ever); } END { printf("%d.%d.%d%s", ver, plev, slev, ever); }' %{_kernelsrcdir}/Makefile 2> /dev/null))
234 %__kernel_rel    %(LC_ALL="C" rpm -qf %{_kernelsrcdir}/include/linux/fs.h --queryformat "%{RELEASE}" | grep -v "is not")
235 %__kernel_rpmvr  %(LC_ALL="C" rpm -qf %{_kernelsrcdir}/include/linux/fs.h --queryformat "%{VERSION}-%{RELEASE}" | grep -v "is not")
236 %_kernel_ver     %{__kernel_ver}%{?with_dist_kernel:%(echo %{__kernel_ver} | grep -q -e - || echo -%{__kernel_rel})}
237 %_kernel_ver_str %(echo %{!?_without_dist_kernel:%{__kernel_rpmvr}}%{?_without_dist_kernel:%{__kernel_ver}} | sed -e 's/-/_/')
238
239 # sgml macros
240 %xmlcat_add()            /usr/bin/xmlcatalog --noout --add nextCatalog \"\" %1 /etc/xml/catalog
241 %xmlcat_del()            /usr/bin/xmlcatalog --noout --del %1 /etc/xml/catalog
242 %xmlcat_add_rewrite      /usr/bin/xmlcatalog --noout --add rewriteSystem
243 %xmlcat_create()          /usr/bin/xmlcatalog --noout --create %1
244 %sgmlcat_add()           /usr/bin/install-catalog --add %1 %2 > /dev/null
245 %sgmlcat_del()           /usr/bin/install-catalog --remove %1 %2 > /dev/null
246 %docbook_sgmlcat_fix() { for l in \
247 '' \
248 '  -- default decl --' \
249 'DTDDECL "-//OASIS//DTD DocBook XML V%2//EN" "../../xml.dcl"' \
250 '  -- hacks for opensp --' \
251 'SYSTEM "file://%{_datadir}/sgml/docbook/xml-dtd-%2/docbookx.dtd" "%{_datadir}/sgml/docbook/xml-dtd-%2/docbookx.dtd"' \
252 'SYSTEM "http://www.oasis-open.org/docbook/xml/%2/docbookx.dtd"                  "%{_datadir}/sgml/docbook/xml-dtd-%2/docbookx.dtd"' \
253 '' \
254 ; do echo $l; done >> %1 \
255 }
256
257 #-----------------------------------------------------------------
258 # find and gzip all files in %{_mandir} and %{infodir}
259 #
260 # Requires: xargs, find
261 #
262 #%no_install_post_compress_docs 1
263 %__spec_install_post_compress_docs { \
264 %{!?no_install_post_compress_docs: \
265         echo "Compress man and info pages."; \
266         %{?verbose:set -x;} \
267         for i in /usr/share/man /usr/X11R6/man /usr/share/info; do \
268                 if [ -d "$RPM_BUILD_ROOT$i" ]; then \
269                         find "$RPM_BUILD_ROOT$i" -name \*.bz2 -print | xargs -r %{__bzip2} -df; \
270                         find "$RPM_BUILD_ROOT$i" -name \*.gz -print | xargs -r %{__gzip} -dnf; \
271                         find "$RPM_BUILD_ROOT$i" -type f -print | xargs -r %{__gzip} -9nf; \
272                 fi; \
273         done; \
274 } }
275
276 #-----------------------------------------------------------------
277 # Strip executable binaries and shared object files
278 #
279 # Requires: find, awk, strip, cut, xargs
280 #
281 #%no_install_post_strip 1
282 %__spec_install_post_strip {%{!?debug: \
283 %{!?no_install_post_strip: \
284     %{?verbose:set -x;} \
285     if [ -d "$RPM_BUILD_ROOT" ]; then \
286         echo "Strip executable binaries, archives and shared object files."; \
287         filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*" %{?_noautostrip:! -regex "%{_noautostrip}"}`; \
288         elfexelist=`echo $filelist | xargs -r file | \
289                 awk '/ELF.*executable/ {print $1}' | cut -d: -f1`; \
290         elfsharedlist=`echo $filelist | xargs -r file | \
291                 awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
292         elfarchiveslist=`echo $filelist | xargs -r file | \
293                 awk '/current ar archive/ {print $1}' | cut -d: -f1`; \
294         if [ -n "$elfexelist" ]; then \
295                 %{__strip} --remove-section=.note  --remove-section=.comment $elfexelist; \
296         fi; \
297         if [ -n "$elfsharedlist" ]; then \
298                 %{__strip} --strip-unneeded --remove-section=.note  --remove-section=.comment $elfsharedlist; \
299         fi; \
300         if [ -n "$elfarchiveslist" ]; then \
301                 %{__strip} --strip-debug --remove-section=.note  --remove-section=.comment $elfarchiveslist; \
302         fi; \
303     fi; } \
304 } }
305 #-----------------------------------------------------------------
306 # remove all RPATH from executable binaries and shared object files
307 #
308 # Requires: find, awk, cut, xargs, chrpath, uname
309 #
310 #%no_install_post_chrpath       1
311 %__spec_install_post_chrpath {%{!?debug: \
312 %{!?no_install_post_chrpath: \
313         %{?verbose:set -x;} \
314 if [ -d "$RPM_BUILD_ROOT" ]; then \
315 echo "Remove RPATH from executable binaries and shared object files."; \
316 find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*" %{?_noautochrpath:! -regex "%{_noautochrpath}"} | xargs -r file | \
317         awk '/ELF.*(executable.*dynamically linked|shared object)/ {print $1}' | cut -d: -f1 | \
318 while read file ; do \
319         rpath= ; \
320         chmod u+w "$file"; \
321         for dir in `chrpath -l "$file" | \
322                     awk '/RPATH=/ { gsub(/.*RPATH=/,""); gsub(/:/," "); print $0 }'` ; do \
323                         case $dir in \
324                         /home/* | /tmp/* | /usr/lib | /usr/lib64 | /lib | /lib64 | /usr/local/lib | /usr/local/lib64 | /usr/X11R6/lib | /usr/X11R6/lib64 ) \
325                                 echo "remove-rpath: $dir in $file"; \
326                                 ;; \
327                         * ) \
328                                 if [ "$rpath" = "" ] ; then rpath="$dir" ; \
329                                 else rpath="$rpath:$dir" ; fi ; \
330                                 ;; \
331                         esac ; \
332         done ; \
333         if [ "$rpath" = "" ] ; then chrpath -d "$file" > /dev/null ; \
334         else chrpath -r "$rpath" "$file" > /dev/null ; fi ; \
335 done; \
336 fi; } \
337 } }
338 #-----------------------------------------------------------------
339 # Find and gzip all kernel modules
340 #
341 # Requires: find
342 #
343 #%no_install_post_compress_modules  1
344 %__spec_install_post_compress_modules { \
345 %{!?no_install_post_compress_modules: \
346     %{?verbose:set -x;} \
347     if [ -d "$RPM_BUILD_ROOT" ]; then \
348 echo "Compress kernel modules if any."; \
349     if test -d $RPM_BUILD_ROOT/lib/modules ; then \
350         find $RPM_BUILD_ROOT/lib/modules -name \*o -type f -print | \
351         xargs -r %{__gzip} -9nf; \
352            find $RPM_BUILD_ROOT/lib/modules -name \*o -type l -printf "%p %l\n" | \
353            while read a b; do ln -sf $b.gz $a.gz; rm -f $a; done; \
354     fi; \
355     fi; \
356 } }
357
358 %_source_payload        w9.gzdio
359 %_binary_payload        w9.bzdio
360
361 #-----------------------------------------------------------------
362 # Update all GConf2 schemas
363 #
364 # Requires: GConf2
365 #
366 %gconf_schema_install { umask 022; \
367     GCONF_CONFIG_SOURCE="xml:readwrite:/etc/gconf/gconf.xml.defaults" \
368     /usr/bin/gconftool-2 --makefile-install-rule \
369     /etc/gconf/schemas/*.schemas > /dev/null \
370 }
371
372 #-----------------------------------------------------------------
373 # post %install sequence:
374 # - autodeps exceptions
375 # - compress all man and info pages,
376 # - strip all ELF executables and ELF shared objects if not %debug.
377 # - compress kernel modules if any
378
379 ###################################################################
380 # Requires/Provides automation
381 # exceptions system by Jacek Konieczny <jajcus@pld.org.pl>
382 #
383 %__noautoreqfiles       %(sed -e s'/#.*//' /etc/rpm/noautoreqfiles)%{?_noautoreqfiles: %{_noautoreqfiles}}
384 %__noautoprovfiles      %(sed -e s'/#.*//' /etc/rpm/noautoprovfiles)%{?_noautoprovfiles: %{_noautoprovfiles}}
385 %__noautoreq            %(sed -e s'/#.*//' /etc/rpm/noautoreq)%{?_noautoreq: %{_noautoreq}}
386 %__noautoreqdep         %(sed -e s'/#.*//' /etc/rpm/noautoreqdep)%{?_noautoreqdep: %{_noautoreqdep}}
387 %__noautoprov           %(sed -e s'/#.*//' /etc/rpm/noautoprov)%{?_noautoprov: %{_noautoprov}}
388 #%_noautocompressdoc    %{nil}
389 #
390 %_missing_doc_files_terminate_build     1%{nil}
391 %_unpackaged_files_terminate_build      %{nil}
392 # (X)emacs support
393 %___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;}'
394 %_emacs_lispdir %(emacs %___emacs_lispdir_helper)
395 %_xemacs_lispdir %(xemacs %___emacs_lispdir_helper)
396
397 %__php_provides %{nil}
398 %__php_requires %{nil}
399 %__perl_provides %{nil}
400 %__perl_requires %{nil}
401
402 # Perl specific macro definitions.
403 %perl_privlib   %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib)
404 %perl_archlib   %(eval "`%{__perl} -V:installarchlib`"; echo $installarchlib)
405 %perl_vendorlib %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)
406 %perl_vendorarch        %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)
407 %perl_sitelib   %(eval "`%{__perl} -V:installsitelib`"; echo $installsitelib)
408 %perl_sitearch  %(eval "`%{__perl} -V:installsitearch`"; echo $installsitearch)
409
410 %php_pear_dir   %{_datadir}/pear
411
412 # Python specific macro definitions.
413 # python main version
414 %py_ver         %(echo `python -c "import sys; print sys.version[:3]"`)
415
416 # directories
417 %py_prefix      %(echo `python -c "import sys; print sys.prefix"`)
418 %py_libdir      %{py_prefix}/%{_lib}/python%{py_ver}
419 %py_scriptdir   %{py_prefix}/share/python%{py_ver}
420 %py_incdir      /usr/include/python%{py_ver}
421 %py_sitedir     %{py_libdir}/site-packages
422 %py_sitescriptdir %{py_scriptdir}/site-packages
423 %py_dyndir      %{py_libdir}/lib-dynload
424
425 # pure python modules compilation
426 %py_comp        python -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
427
428 %py_ocomp       python -O -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
429
430 # Software written in Python language require Python with main version
431 # unchanged
432 %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, '.')"`)
433
434 # depmod macro
435 %depmod() { \
436 if [ -e /boot/System.map-%1 ]; then \
437         /sbin/depmod -a -F /boot/System.map-%1 %1; \
438 else \
439         if [ -e /boot/System.map ]; then \
440                 /sbin/depmod -a -F /boot/System.map %1; \
441         else \
442                 /sbin/depmod -a %1; \
443         fi \
444 fi; \
445 }
446
447 # XMMS specific macros
448 %xmms_prefix                  %(xmms-config --prefix)
449 %xmms_exec_prefix             %(xmms-config --exec-prefix)
450 %xmms_version                 %(xmms-config --version)
451 %xmms_datadir                 %(xmms-config --data-dir)
452 %xmms_plugindir               %(xmms-config --plugin-dir)
453 %xmms_visualization_plugindir %(xmms-config --visualization-plugin-dir)
454 %xmms_input_plugindir         %(xmms-config --input-plugin-dir)
455 %xmms_output_plugindir        %(xmms-config --output-plugin-dir)
456 %xmms_effect_plugindir        %(xmms-config --effect-plugin-dir)
457 %xmms_general_plugindir       %(xmms-config --general-plugin-dir)
458
459 %_target_base_arch      %(echo %{_target_cpu} | sed 's/i.86/i386/;s/athlon/i386/;s/pentium./i386/;s/amd64/x86_64/')
460
461 # user/group checking macros
462 #
463 # Usage:
464 #       %userremove myuser
465 #
466 %userremove     /usr/lib/rpm/user_group.sh user del
467 %groupremove    /usr/lib/rpm/user_group.sh group del
468 #
469 # Usage:
470 #       if %usertestrm myuser; then
471 #               /usr/sbin/userdel -r myuser
472 # Note:
473 #       use these macros only if you need to call userdel/groupdel with
474 #       a non-standard option or take an extra action; otherwise use the
475 #       %userremove/%groupremove macros
476 #
477 %usertestrm     /usr/lib/rpm/user_group.sh user testrm
478 %grouptestrm    /usr/lib/rpm/user_group.sh group testrm
479 # user group membership management macros
480 #
481 # Usage:
482 #       %addusertogroup myuser agroup
483 #
484 %addusertogroup /usr/lib/rpm/user_group.sh user addtogroup
485 Index: rpm.macros
486 ===================================================================
487 RCS file: /cvsroot/SOURCES/rpm.macros,v
488 retrieving revision 1.158.4.8
489 diff -u -r1.158.4.8 rpm.macros
490 --- rpm.macros  29 Oct 2004 11:38:09 -0000      1.158.4.8
491 +++ rpm.macros  23 Nov 2004 13:47:51 -0000
492 @@ -471,3 +471,19 @@
493  #      %addusertogroup myuser agroup
494  #
495  %addusertogroup        /usr/lib/rpm/user_group.sh user addtogroup
496
497 # banner support (useful in {pre,post}{,un} and triggers)
498 #
499 # Usage:
500 #       %banner name [-a] [-n] [-tn]
501 # the banner text, the banner text
502 # the banner text, and following line HAVE TO BE:
503 # EOF
504 # -a   - append to the banner
505 # -n   - no show banner (overriden by -t)
506 # -t   - show only, if RPM_SCRIPTVERBOSITY >= n
507 %banner(a:n:t:) \
508         [ -r /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm || RPM_SCRIPTVERBOSITY=5; \
509         %{_bindir}/banner.sh %{!-t:%{!-n:-s}} %{-t:`[ $RPM_SCRIPTVERBOSITY -ge %{-t*} ] && echo "-s"`} %{!-a:-m}%{-a:-M} %1 << EOF\
510 %nil
511
This page took 0.477606 seconds and 3 git commands to generate.