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