Rename db0.c to db1.c, resurrect db2.c (from db3.c).
[tools/librpm-tizen.git] / macros.in
1 # $Id: macros.in,v 1.56 2000/05/01 17:50:35 jbj Exp $
2 #==============================================================================
3 # Macro naming conventions (preliminary):
4 #
5 #       Macros that begin with an underscore are "local" in the sense that
6 #       they (if used) will not be exported in rpm headers. Some macros
7 #       that don't start with an underscore (but look like they should)
8 #       are compatible with macros generated by rpm-2.5.x and will be made
9 #       more consistent in a future release.
10 #
11
12 #==============================================================================
13 # ---- A macro that expands to nothing.
14 #
15 %nil    %{!?nil}
16
17 #==============================================================================
18 # ---- filesystem macros.
19 #
20 %_usr                   @prefix@
21 %_usrsrc                %{_usr}/src
22 %_var                   @varprefix@
23
24 #==============================================================================
25 # ---- Generally useful path macros.
26 #
27 %__awk                  @AWK@
28 %__bzip2                %{_bzip2bin}
29 %__cat                  @__CAT@
30 %__chgrp                @__CHGRP@
31 %__chmod                @__CHMOD@
32 %__chown                @__CHOWN@
33 %__cp                   @__CP@
34 %__cpio                 @__CPIO@
35 %__grep                 @__GREP@
36 %__gzip                 %{_gzipbin}
37 %__id                   @__ID@
38 %__install              @__INSTALL@
39 %__ln_s                 @LN_S@
40 %__make                 @__MAKE@
41 %__mkdir                @__MKDIR@
42 %__mkdir_p              @MKDIR_P@
43 %__mv                   @__MV@
44 %__patch                @__PATCH@
45 %__perl                 @__PERL@
46 %__pgp                  %{_pgpbin}
47 %__rm                   @__RM@
48 %__rsh                  @__RSH@
49 %__sed                  @__SED@
50 %__ssh                  @__SSH@
51 %__tar                  @__TAR@
52
53 #==============================================================================
54 # ---- Build system path macros.
55 #
56 %__ar                   @AR@
57 %__cc                   @CC@
58 %__cpp                  @CPP@
59 %__ld                   @__LD@
60 %__nm                   @__NM@
61 %__objcopy              @__OBJCOPY@
62 %__objdump              @__OBJDUMP@
63 %__ranlib               @RANLIB@
64 %__remsh                %{__rsh}
65 %__strip                @__STRIP@
66
67 # XXX avoid failures if tools are not installed when rpm is built.
68 %__libtoolize           libtoolize
69 %__aclocal              aclocal
70 %__autoheader           autoheader
71 %__automake             automake
72 %__autoconf             autoconf
73
74 #==============================================================================
75 # ---- Required rpmrc macros.
76 #       Macros that used to be initialized as a side effect of rpmrc parsing.
77 #       These are the default values that can be overridden by other
78 #       (e.g. per-platform, per-system, per-packager, per-package) macros.
79 #
80 %_builddir              %{_topdir}/BUILD
81 %_buildshell            /bin/sh
82 %_bzip2bin              @BZIP2BIN@
83 %_dbpath                %{_var}/lib/rpm
84 %_rebuilddbpath         %{_dbpath}
85 %_dbpath_rebuild        %{_dbpath}
86 %_defaultdocdir         %{_usr}/doc
87 #
88 %__find_provides        @FINDPROVIDES@
89 %__find_requires        @FINDREQUIRES@
90 #%__find_prereq         ???
91 #%__find_conflicts      ???
92 #%__find_obsoletes      ???
93 #
94 # XXX fixowner, fixgroup, and fixperms are run at the end of hardcoded setup
95 %__id_u                 @__ID_U@
96 %__chown_Rhf            @__CHOWN_RHF@
97 %__chgrp_Rhf            @__CHGRP_RHF@
98 %_fixowner              [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root
99 %_fixgroup              [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} @ROOT_GROUP@
100 %_fixperms              %{__chmod} -Rf @FIXPERMS@
101 #
102 %_gzipbin               @GZIPBIN@
103 %_instchangelog         5
104 %_pgpbin                @PGPBIN@
105 %_rpmdir                %{_topdir}/RPMS
106 #
107 # XXX Note escaped %% for use in headerSprintf
108 %_rpmfilename           %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
109 %_signature             none
110 %_sourcedir             %{_topdir}/SOURCES
111 %_specdir               %{_topdir}/SPECS
112 %_srcrpmdir             %{_topdir}/SRPMS
113 %_tmppath               %{_var}/tmp
114 %_topdir                %{_usrsrc}/redhat
115
116 #==============================================================================
117 # ---- Optional rpmrc macros.
118 #       Macros that are initialized as a side effect of rpmrc and/or spec
119 #       file parsing.
120 #
121 #       Configurable build root path, same as BuildRoot: in a specfile.
122 #       (Note: the configured macro value will override the spec file value).
123 #
124 #%buildroot
125
126 #       The sub-directory (relative to %{_builddir}) where sources are compiled.
127 #       This macro is set after processing %setup, either explicitly from the
128 #       value given to -n or the default name-version.
129 #
130 #%buildsubdir
131
132 #       Configurable distribution information, same as Distribution: in a
133 #       specfile.
134 #
135 #%distribution
136
137 #       Boolean (i.e. 1 == "yes", 0 == "no") that controls whether files
138 #       marked as %doc should be installed.
139 #%_excludedocs
140
141 #       The port and machine name of a FTP proxy host running TIS firewall.
142 #
143 #%_ftpport
144 #%_ftpproxy
145
146 #       The signature to use and the location of configuration files for
147 #       signing packages with GNU gpg.
148 #
149 #%_gpg_name
150 #%_gpg_path
151
152 #       The port and machine name of an HTTP proxy host.
153 #
154 #%_httpport
155 #%_httpproxy
156
157 #       The PATH put into the environment before running %pre/%post et al.
158 #
159 %_install_script_path   /sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin
160
161 #       A colon separated list of desired locales to be installed;
162 #       "all" means install all locale specific files.
163 #       
164 %_install_langs all
165
166 #
167 #       Deprecated.
168 #%_langpatt
169
170 #       A colon separated list of paths where files should *not* be installed.
171 #       Usually, these are network file system mount points.
172 #
173 #%_netsharedpath
174
175 #       Configurable packager information, same as Packager: in a specfile.
176 #
177 #%packager
178
179 #       Compression type and level for package payloads.
180 #               "w9.gzdio"      gzip level 9 (default).
181 #               "w9.bzdio"      bzip2 level 9 (experimental, at your own risk).
182 #
183 #%_payload_compression  w9.gzdio
184
185 #       The signature to use and the location of configuration files for
186 #       signing packages with PGP.
187 #
188 #%_pgp_name
189 #%_pgp_path
190
191 #       Configurable virtual provides (unimplemented, use Provides: ...
192 #       in an rpmrc file).
193 #
194 #%_provides
195
196 #       Deprecated.
197 #
198 #%_timecheck
199
200 #       Configurable vendor information, same as Vendor: in a specfile.
201 #
202 #%vendor
203
204 #==============================================================================
205 # ---- Database configuration macros.
206 #       Macros used to configure Berkley db parameters.
207 #
208 # Choose db interface:
209 #       0       same as 1
210 #       1       native db1 interface (e.g. linux glibc libdb1 routines).
211 #       2       native db2 interface.
212 #       3       native db3 interface.
213 #       -1      db3 -> db2 -> db1 (as available).
214 #
215 # There are two macros so that --rebuilddb can convert db1 -> db3
216 %_dbapi                 1
217 %_dbapi_rebuild         3
218
219 #
220 #   token               Berkeley db flag or value
221 # =================================================
222 #   recover             DB_RECOVER
223 #   recover_fatal       DB_RECOVER_FATAL
224 #   create              DB_CREATE
225 #   lockdown            DB_LOCKDOWN
226 #   cdb                 DB_INIT_CDB
227 #   lock                DB_INIT_LOCK
228 #   log                 DB_INIT_LOG
229 #   mpool               DB_INIT_MPOOL
230 #   txn                 DB_INIT_TXN
231 #   nommap              DB_NOMMAP
232 #   private             DB_PRIVATE
233 #   shared              DB_SYSTEM_MEM
234 #   thread              DB_THREAD
235 #   txn_nosync          DB_TXN_NOSYNC
236 #   hash                DB_HASH
237 #
238 # See http://www.sleepycat.com for Berkeley db-3.0.55 configuration.
239 #
240 # The (intended) default value for rpm-3.1 on Red Hat Linux is
241 #       db3:hash:mpool:cdb:usecursors:mp_mmapsize=8Mb:mp_size=8Mb:pagesize=512
242 #
243 # Additional rpm specific configuration:
244 #   usecursors  Should DB3 cursors be used in get/put/del ?
245 #
246 %__dbi_major            db%{_dbapi}
247 %__dbi_type             hash
248 %__dbi_flags            mpool:cdb
249 %__dbi_other            usecursors
250 %__dbi_verbose          verbose
251 %__dbi_mp_mmapsize      mp_mmapsize=16Mb
252 %__dbi_mp_size          mp_size=512Kb
253 %__dbi_pagesize         pagesize=512
254 %__dbi_perms            perms=0644
255
256 # This is a colon (or white space) separated list of tokens for Berkeley
257 # dbi configuration.
258 %_dbi_config    \
259   %{__dbi_major}\
260   %{__dbi_type}\
261   %{__dbi_flags}\
262   %{__dbi_other}\
263   %{__dbi_verbose}\
264   %{__dbi_mp_mmapsize}\
265   %{__dbi_mp_size}\
266   %{__dbi_pagesize}\
267   %{__dbi_perms}\
268 %{nil}
269
270 # The list of tags for which indices will be built.
271 %_dbi_indices   Packages:Name:Basenames:Group:Requirename:Providename:Conflictname:Triggername:Depends
272
273 # "Depends" is a per-transaction cache of known dependency resolutions.
274 %_dbi_config_Depends    %{_dbi_config}:temporary
275
276 #==============================================================================
277 # ---- per-platform macros.
278 #       Macros that are specific to an individual platform. The values here
279 #       will be used if the per-platform macro file does not exist..
280 #
281 %_arch                  @RPMCANONARCH@
282 %_vendor                @RPMCANONVENDOR@
283 %_os                    @RPMCANONOS@
284 %_target_platform       %{_target_cpu}-%{_vendor}-%{_target_os}
285 #
286 # XXX use the rpmrc instantiated macro for now
287 #%optflags              -O2
288
289 %__arch_install_post    %{nil}
290 %__os_install_post      %{___build_post}
291
292 #==============================================================================
293 # ---- Scriptlet template templates.
294 #       Global defaults used for building scriptlet templates.
295 #
296 # XXX legacy configuration, this will be eliminated after rpm-3.0.4.
297 %_preScriptEnvironment  \
298 RPM_SOURCE_DIR=\"%{_sourcedir}\"\
299 RPM_BUILD_DIR=\"%{_builddir}\"\
300 RPM_OPT_FLAGS=\"%{optflags}\"\
301 RPM_ARCH=\"%{_arch}\"\
302 RPM_OS=\"%{_os}\"\
303 export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS\
304 RPM_DOC_DIR=\"%{_docdir}\"\
305 export RPM_DOC_DIR\
306 RPM_PACKAGE_NAME=\"%{name}\"\
307 RPM_PACKAGE_VERSION=\"%{version}\"\
308 RPM_PACKAGE_RELEASE=\"%{release}\"\
309 export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE\
310 %{?buildroot:RPM_BUILD_ROOT=\"%{buildroot}\"\
311 export RPM_BUILD_ROOT}
312
313 %___build_shell         %{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh}
314 %___build_args          -e
315 %___build_cmd           %{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args}
316 %___build_pre   \
317 RPM_SOURCE_DIR=\"%{u2p:%{_sourcedir}}\"\
318 RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\
319 RPM_OPT_FLAGS=\"%{optflags}\"\
320 RPM_ARCH=\"%{_arch}\"\
321 RPM_OS=\"%{_os}\"\
322 export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS\
323 RPM_DOC_DIR=\"%{_docdir}\"\
324 export RPM_DOC_DIR\
325 RPM_PACKAGE_NAME=\"%{name}\"\
326 RPM_PACKAGE_VERSION=\"%{version}\"\
327 RPM_PACKAGE_RELEASE=\"%{release}\"\
328 export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE\
329 %{?buildroot:RPM_BUILD_ROOT=\"%{u2p:%{buildroot}}\"\
330 export RPM_BUILD_ROOT}\
331 \
332 %{verbose:set -x}%{!verbose:exec > /dev/null}\
333 umask 022\
334 cd %{u2p:%{_builddir}}\
335
336
337 #%___build_body         %{nil}
338 %___build_post          exit 0
339
340 %___build_template      #!%{___build_shell}\
341 %{___build_pre}\
342 %{nil}
343
344 #%{___build_body}\
345 #%{___build_post}\
346 #%{nil}
347
348 #==============================================================================
349 # ---- Scriptlet templates.
350 #       Macro(s) that expand to a command and script that is executed.
351 #       CAVEAT: All macro expansions must fit in a BUFSIZ (8192 byte) buffer.
352 #
353 %__spec_prep_shell      %{___build_shell}
354 %__spec_prep_args       %{___build_args}
355 %__spec_prep_cmd        %{___build_cmd}
356 %__spec_prep_pre        %{___build_pre}
357 %__spec_prep_body       %{___build_body}
358 %__spec_prep_post       %{___build_post}
359 %__spec_prep_template   #!%{__spec_prep_shell}\
360 %{__spec_prep_pre}\
361 %{nil}
362
363 #%{__spec_prep_body}\
364 #%{__spec_prep_post}\
365 #%{nil}
366
367 %__spec_build_shell     %{___build_shell}
368 %__spec_build_args      %{___build_args}
369 %__spec_build_cmd       %{___build_cmd}
370 %__spec_build_pre       %{___build_pre}
371 %__spec_build_body      %{___build_body}
372 %__spec_build_post      %{___build_post}
373 %__spec_build_template  #!%{__spec_build_shell}\
374 %{__spec_build_pre}\
375 %{nil}
376
377 #%{__spec_build_body}\
378 #%{__spec_build_post}\
379 #%{nil}
380
381 %__spec_install_shell   %{___build_shell}
382 %__spec_install_args    %{___build_args}
383 %__spec_install_cmd     %{___build_cmd}
384 %__spec_install_pre     %{___build_pre}
385 %__spec_install_body    %{___build_body}
386 %__spec_install_post\
387 %{__arch_install_post}\
388 %{__os_install_post}\
389 %{nil}
390 %__spec_install_template        #!%{__spec_install_shell}\
391 %{__spec_install_pre}\
392 %{nil}
393
394 #%{__spec_install_body}\
395 #%{__spec_install_post}\
396 #%{nil}
397
398 #%__spec_autodep_shell  %{___build_shell}
399 #%__spec_autodep_args   %{___build_args}
400 #%__spec_autodep_cmd    %{___build_cmd}
401 #%__spec_autodep_pre    %{___build_pre}
402 #%__spec_autodep_body   %{___build_body}
403 #%__spec_autodep_post   %{___build_post}
404 #%__spec_autodep_template       #!%{__spec_autodep_shell}\
405 #%{__spec_autodep_pre}\
406 #%{nil}
407
408 #%{__spec_autodep_body}\
409 #%{__spec_autodep_post}\
410 #%{nil}
411
412 %__spec_clean_shell     %{___build_shell}
413 %__spec_clean_args      %{___build_args}
414 %__spec_clean_cmd       %{___build_cmd}
415 %__spec_clean_pre       %{___build_pre}
416 %__spec_clean_body      %{___build_body}
417 %__spec_clean_post      %{___build_post}
418 %__spec_clean_template  #!%{__spec_clean_shell}\
419 %{__spec_clean_pre}\
420 %{nil}
421
422 #%{__spec_clean_body}\
423 #%{__spec_clean_post}\
424 #%{nil}
425
426 %__spec_rmbuild_shell   %{___build_shell}
427 %__spec_rmbuild_args    %{___build_args}
428 %__spec_rmbuild_cmd     %{___build_cmd}
429 %__spec_rmbuild_pre     %{___build_pre}
430 %__spec_rmbuild_body    %{___build_body}
431 %__spec_rmbuild_post    %{___build_post}
432 %__spec_rmbuild_template        #!%{__spec_rmbuild_shell}\
433 %{__spec_rmbuild_pre}\
434 %{nil}
435
436 #%{__spec_rmbuild_body}\
437 #%{__spec_rmbuild_post}\
438 #%{nil}
439
440 # XXX We don't expand pre/post install scriptlets (yet).
441 #%__spec_pre_pre                %{nil}
442 #%__spec_pre_post               %{nil}
443 #%__spec_post_pre               %{nil}
444 #%__spec_post_post              %{nil}
445 #%__spec_preun_pre              %{nil}
446 #%__spec_preun_post             %{nil}
447 #%__spec_postun_pre             %{nil}
448 #%__spec_postun_post            %{nil}
449 #%__spec_triggerpostun_pre      %{nil}
450 #%__spec_triggerpostun_post     %{nil}
451 #%__spec_triggerun_pre          %{nil}
452 #%__spec_triggerun_post         %{nil}
453 #%__spec_triggerin_pre          %{nil}
454 #%__spec_triggerin_post         %{nil}
455
456 #==============================================================================
457 # ---- configure macros.
458 #       Macro(s) slavishly copied from autoconf's config.status.
459 #
460 %_prefix                @prefix@
461 %_exec_prefix           %{_prefix}
462 %_bindir                %{_exec_prefix}/bin
463 %_sbindir               %{_exec_prefix}/sbin
464 %_libexecdir            %{_exec_prefix}/libexec
465 %_datadir               %{_prefix}/share
466 %_sysconfdir            %{_prefix}/etc
467 %_sharedstatedir        %{_prefix}/com
468 %_localstatedir         %{_prefix}/var
469 %_lib                   lib
470 %_libdir                %{_exec_prefix}/%{_lib}
471 %_includedir            %{_prefix}/include
472 %_oldincludedir         /usr/include
473 %_infodir               %{_prefix}/info
474 %_mandir                %{_prefix}/man
475
476 #==============================================================================
477 # ---- config.guess platform macros.
478 #       Macro(s) similar to the tokens used by configure.
479 #
480 %_build                 %{_host}
481 %_build_alias           %{_host_alias}
482 %_build_cpu             %{_host_cpu}
483 %_build_vendor          %{_host_vendor}
484 %_build_os              %{_host_os}
485 %_host                  @host@
486 %_host_alias            @host_alias@
487 %_host_cpu              @host_cpu@
488 %_host_vendor           @host_vendor@
489 %_host_os               @host_os@
490 %_target                %{_host}
491 %_target_alias          %{_host_alias}
492 %_target_cpu            %{_host_cpu}
493 %_target_vendor         %{_host_vendor}
494 %_target_os             %{_host_os}
495
496 #==============================================================================
497 # ---- specfile macros.
498 #       Macro(s) here can be used reliably for reproducible builds.
499 #       (Note: Above is the goal, below are the macros under development)
500 #
501 # The configure macro does the following:
502 #       optionally change to a subdirectory (not implemented).
503 #       attempt to update config.guess and config.sub.
504 #       run configure with correct prefix, platform, and CFLAGS.
505 #       optionally restore current directory (not implemented).
506 # The configure macro should be invoked as %configure (rather than %{configure})
507 # because the rest of the arguments will be expanded using %*. Another
508 # gotcha is that arguments, if present, should be on the same line as the
509 # %configure.
510 #
511 %configure      \
512   %{?__libtoolize:[ -f configure.in ] && %{__libtoolize} --copy --force} \
513   CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix}
514
515 #------------------------------------------------------------------------------
516 # This is an improved version of %configure that may replace the above
517 # macro at some point (from PLD team).
518 #
519 #%configure { CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
520 # CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
521 # FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
522 # ./configure %{_target_platform} \
523 #       --prefix=%{_prefix} \
524 #       --exec-prefix=%{_exec_prefix} \
525 #       --bindir=%{_bindir} \
526 #       --sbindir=%{_sbindir} \
527 #       --sysconfdir=%{_sysconfdir} \
528 #       --datadir=%{_datadir} \
529 #       --includedir=%{_includedir} \
530 #       --libdir=%{_libdir} \
531 #       --libexecdir=%{_libexecdir} \
532 #       --localstatedir=%{_localstatedir} \
533 #       --sharedstatedir=%{_sharedstatedir} \
534 #       --mandir=%{_mandir} \
535 #       --infodir=%{_infodir} }
536
537 #------------------------------------------------------------------------------
538 # The GNUconfigure macro does the following:
539 #       update config.guess and config.sub.
540 #       regenerate all autoconf/automake files
541 #       optionally change to a directory (make the directory if requested).
542 #       run configure with correct prefix, platform, and CFLAGS.
543 #       optionally restore current directory.
544 #
545 # Based on autogen.sh from GNOME and orginal GNUconfigure
546 #
547 %GNUconfigure(MCs:)      \
548   CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS; \
549   LDFLAGS="${LDFLAGS:-'%{-s:-s}'}"  ; export LDFLAGS; \
550   %{-C:_mydir="`pwd`"; %{-M: %{__mkdir} -p %{-C*};} cd %{-C*}} \
551   dirs="`find ${_mydir} -name configure.in -print`"; export dirs; \
552     for coin in `echo ${dirs}` \
553 do \
554   dr=`dirname ${coin}`; \
555 if test -f ${dr}/NO-AUTO-GEN; then \
556  : \
557 else \
558      macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < ${coin}`; \
559     ( cd ${dr}; \
560       aclocalinclude="${ACLOCAL_FLAGS}"; \
561       for k in ${macrodirs}; do \
562         if test -d ${k}; then \
563           aclocalinclude="${aclocalinclude} -I ${k}"; \
564         ##else \
565         ##  echo "**Warning**: No such directory \`${k}'.  Ignored." \
566         fi \
567       done \
568       if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then \
569         if grep "sed.*POTFILES" configure.in >/dev/null; then \
570           : do nothing -- we still have an old unmodified configure.in \
571         else \
572           test -r ${dr}/aclocal.m4 || touch ${dr}/aclocal.m4; \
573           echo "no" | gettextize --force --copy; \
574           test -r ${dr}/aclocal.m4 && %{__chmod} u+w ${dr}/aclocal.m4; \
575         fi \
576       fi \
577       if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then \
578         %{__libtoolize} --force --copy; \
579       fi \
580       aclocal ${aclocalinclude}; \
581       if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then \
582         %{__autoheader}; \
583       fi \
584       echo "Running automake --gnu ${am_opt} ..."; \
585       %{__automake} --add-missing --gnu ${am_opt}; \
586       %{__autoconf}; \
587     ); \
588   fi \
589 done \
590   %{-C:${_mydir}}%{!-C:.}/configure %{_target_platform} --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} --bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} --datadir=%{_datadir} --includedir=%{_includedir} --libdir=%{_libdir} --libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} --sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} --infodir=%{_infodir} %* ; \
591   %{-C:cd ${_mydir}; unset _mydir}
592
593 #------------------------------------------------------------------------------
594 # Useful perl macros (from Artur Frysiak <wiget@t17.ds.pwr.wroc.pl>)
595 #
596 # For example, these can be used as (from ImageMagick.spec from PLD site)
597 #       [...]
598 #       BuildPrereq: perl
599 #       [...]
600 #       %package perl
601 #       Summary: libraries and modules for access to ImageMagick from perl
602 #       Group: Development/Languages/Perl
603 #       Requires: %{name} = %{version}
604 #       %requires_eq    perl
605 #       [...]
606 #       %install
607 #       rm -fr $RPM_BUILD_ROOT
608 #       install -d $RPM_BUILD_ROOT/%{perl_sitearch}
609 #       [...]
610 #       %files perl
611 #       %defattr(644,root,root,755)
612 #       %{perl_sitearch}/Image
613 #       %dir %{perl_sitearch}/auto/Image
614 #
615 %requires_eq()  %(LC_ALL="C" rpm -q --queryformat 'Requires:%%{NAME} = %%{VERSION}' %1| grep -v "is not")
616 %perl_sitearch  %(eval "`perl -V:installsitearch`"; echo $installsitearch)
617 %perl_archlib   %(eval "`perl -V:installarchlib`"; echo $installarchlib)
618
619 #------------------------------------------------------------------------------
620 # arch macro for all Intel i?86 compatibile processors
621 #  (Note: This macro (and it's analogues) will probably be obsoleted when
622 #   rpm can use regular expressions against target platforms in macro
623 #   conditionals. This change will be introduced after rpm-3.0.4).
624 #
625 %ix86   i386 i486 i586 i686 i786 i886 i986
626
627 #------------------------------------------------------------------------
628 # Use in %install to generate locale specific file lists. For example,
629 #
630 # %install
631 # ...
632 # %find_lang %{name}
633 # ...
634 # %files -f %{name}.lang
635 #
636 %find_lang      @RPMCONFIGDIR@/find-lang.sh %{buildroot}
637