Kill the last remaining varprefix
[platform/upstream/rpm.git] / macros.in
1 #/*! \page config_macros Default configuration: @RPMCONFIGDIR@/macros
2 # \verbatim
3 #
4 # This is a global RPM configuration file. All changes made here will
5 # be lost when the rpm package is upgraded. Any per-system configuration
6 # should be added to /etc/rpm/macros, while per-user configuration should
7 # be added to ~/.rpmmacros.
8 #
9 #==============================================================================
10 # Macro naming conventions (preliminary):
11 #
12 #       Macros that begin with an underscore are "local" in the sense that
13 #       they (if used) will not be exported in rpm headers. Some macros
14 #       that don't start with an underscore (but look like they should)
15 #       are compatible with macros generated by rpm-2.5.x and will be made
16 #       more consistent in a future release.
17 #
18
19 #==============================================================================
20 # ---- A macro that expands to nothing.
21 #
22 %nil                    %{!?nil}
23
24 #==============================================================================
25 # ---- filesystem macros.
26 #
27 %_usr                   @prefix@
28 %_usrsrc                %{_usr}/src
29 %_var                   @localstatedir@
30
31 #==============================================================================
32 # ---- Generally useful path macros.
33 #
34 %__awk                  @AWK@
35 %__bzip2                @__BZIP2@
36 %__cat                  @__CAT@
37 %__chgrp                @__CHGRP@
38 %__chmod                @__CHMOD@
39 %__chown                @__CHOWN@
40 %__cp                   @__CP@
41 %__cpio                 @__CPIO@
42 %__file                 @__FILE@
43 %__gpg                  @__GPG@
44 %__grep                 @__GREP@
45 %__gzip                 @__GZIP@
46 %__id                   @__ID@
47 %__install              @__INSTALL@
48 %__ln_s                 @LN_S@
49 %__lzma                 @__LZMA@
50 %__make                 @__MAKE@
51 %__mkdir                @__MKDIR@
52 %__mkdir_p              @MKDIR_P@
53 %__mv                   @__MV@
54 %__patch                @__PATCH@
55 %__perl                 @__PERL@
56 %__pgp                  @__PGP@
57 %__python               @__PYTHON@
58 %__rm                   @__RM@
59 %__rsh                  @__RSH@
60 %__sed                  @__SED@
61 %__ssh                  @__SSH@
62 %__tar                  @__TAR@
63 %__unzip                @__UNZIP@
64
65 #==============================================================================
66 # ---- Build system path macros.
67 #
68 %__ar                   @AR@
69 %__as                   @AS@
70 %__cc                   @__CC@
71 %__cpp                  @CPP@
72 %__cxx                  @CXX@
73 %__ld                   @__LD@
74 %__nm                   @__NM@
75 %__objcopy              @__OBJCOPY@
76 %__objdump              @__OBJDUMP@
77 %__ranlib               @RANLIB@
78 %__remsh                %{__rsh}
79 %__strip                @__STRIP@
80
81 # XXX avoid failures if tools are not installed when rpm is built.
82 %__libtoolize           libtoolize
83 %__aclocal              aclocal
84 %__autoheader           autoheader
85 %__automake             automake
86 %__autoconf             autoconf
87
88 #==============================================================================
89 # Conditional build stuff.
90
91 # Check if symbol is defined.
92 # Example usage: %if %{defined with_foo} && %{undefined with_bar} ...
93 %defined()      %{expand:%%{?%{1}:1}%%{!?%{1}:0}}
94 %undefined()    %{expand:%%{?%{1}:0}%%{!?%{1}:1}}
95
96 # Shorthand for %{defined with_...}
97 %with()         %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}
98 %without()      %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}
99
100 # Handle conditional builds. %bcond_with is for case when feature is
101 # default off and needs to be activated with --with ... command line
102 # switch. %bcond_without is for the dual case.
103 #
104 # %bcond_with foo defines symbol with_foo if --with foo was specified on
105 # command line.
106 # %bcond_without foo defines symbol with_foo if --without foo was *not*
107 # specified on command line.
108 #
109 # For example (spec file):
110 #
111 # (at the beginning)
112 # %bcond_with extra_fonts
113 # %bcond_without static
114 # (and later)
115 # %if %{with extra_fonts}
116 # ...
117 # %else
118 # ...
119 # %endif
120 # %if ! %{with static}
121 # ...
122 # %endif
123 # %ifdef %{with static}
124 # ...
125 # %endif
126 # %{?with_static: ... }
127 # %{!?with_static: ... }
128 # %{?with_extra_fonts: ... }
129 # %{!?with_extra_fonts: ... }
130
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 #==============================================================================
139 # ---- Required rpmrc macros.
140 #       Macros that used to be initialized as a side effect of rpmrc parsing.
141 #       These are the default values that can be overridden by other
142 #       (e.g. per-platform, per-system, per-packager, per-package) macros.
143 #
144 #       The directory where sources/patches will be unpacked and built.
145 %_builddir              %{_topdir}/BUILD
146
147 #       The interpreter used for build scriptlets.
148 %_buildshell            /bin/sh
149
150 #       The path to the bzip2 executable (legacy, use %{__bzip2} instead).
151 %_bzip2bin              %{__bzip2}
152
153 #       The location of the rpm database file(s).
154 %_dbpath                %{_var}/lib/rpm
155
156 #       The location of the rpm database file(s) after "rpm --rebuilddb".
157 %_dbpath_rebuild        %{_dbpath}
158
159 %_keyringpath           %{_dbpath}/pubkeys/
160
161 #
162 #       Path to script that creates debug symbols in a /usr/lib/debug
163 #       shadow tree.
164 #
165 #       A spec file can %%define _find_debuginfo_opts to pass options to
166 #       the script.  See the script for details.
167 #
168 %__debug_install_post   \
169    @RPMCONFIGDIR@/find-debuginfo.sh %{?_missing_build_ids_terminate_build:--strict-build-id} %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"\
170 %{nil}
171
172 #       Template for debug information sub-package.
173 %debug_package \
174 %ifnarch noarch\
175 %global __debug_package 1\
176 %package debug\
177 Summary: Debug information for package %{name}\
178 Group: Development/Debug\
179 AutoReqProv: 0\
180 %description debug\
181 This package provides debug information for package %{name}.\
182 Debug information is useful when developing applications that use this\
183 package or when debugging this package.\
184 %files debug -f debugfiles.list\
185 %defattr(-,root,root)\
186 %endif\
187 %{nil}
188
189 %_defaultdocdir         %{_datadir}/doc
190
191 #       The path to the gzip executable (legacy, use %{__gzip} instead).
192 %_gzipbin               %{__gzip}
193
194 #       The number of changelog entries kept when installing (legacy, unused in
195 #       rpm-4.0.1 and later).
196 %_instchangelog         5
197
198 #       The path to the pgp executable (legacy, use %{__pgp} instead).
199 %_pgpbin                %{__pgp}
200
201 #       The directory where newly built binary packages will be written.
202 %_rpmdir                %{_topdir}/RPMS
203
204 #       A template used to generate the output binary package file name
205 #       (legacy).
206 %_rpmfilename           %{_build_name_fmt}
207
208 #       The default signature type.
209 %_signature             gpg
210
211 #       The directory where sources/patches from a source package will be
212 #       installed. This is also where sources/patches are found when building.
213 %_sourcedir             %{_topdir}/SOURCES
214
215 #       The directory where the spec file from a source package will be
216 #       installed.
217 %_specdir               %{_topdir}/SPECS
218
219 #       The directory where newly built source packages will be written.
220 %_srcrpmdir             %{_topdir}/SRPMS
221
222 #       The directory where buildroots will be created.
223 %_buildrootdir          %{_topdir}/BUILDROOT
224
225 #       Build root path, where %install installs the package during build.
226 %buildroot              %{_buildrootdir}/%{name}-%{version}-%{release}.%{_arch}
227
228 #       Directory where temporaray files can be created.
229 %_tmppath               %{_var}/tmp
230
231 #       Path to top of build area.
232 %_topdir                %(echo $HOME)/rpmbuild
233
234 #       The path to the unzip executable (legacy, use %{__unzip} instead).
235 %_unzipbin              %{__unzip}
236
237 #==============================================================================
238 # ---- Optional rpmrc macros.
239 #       Macros that are initialized as a side effect of rpmrc and/or spec
240 #       file parsing.
241 #
242 #       The sub-directory (relative to %{_builddir}) where sources are compiled.
243 #       This macro is set after processing %setup, either explicitly from the
244 #       value given to -n or the default name-version.
245 #
246 #%buildsubdir
247
248 #       Configurable distribution information, same as Distribution: tag in a
249 #       specfile.
250 #
251 #%distribution
252
253 #       Configurable distribution URL, same as DistURL: tag in a specfile.
254 #       The URL will be used to supply reliable information to tools like
255 #       rpmfind.
256 #
257 # Note: You should not configure with disturl (or build packages with
258 # the DistURL: tag) unless you are willing to supply content in a
259 # yet-to-be-determined format at the URL specified.
260 #
261 #%disturl
262
263 #       Boolean (i.e. 1 == "yes", 0 == "no") that controls whether files
264 #       marked as %doc should be installed.
265 #%_excludedocs
266
267 #       The port and machine name of a FTP proxy host running TIS firewall.
268 #
269 #%_ftpport
270 #%_ftpproxy
271
272 #       The signature to use and the location of configuration files for
273 #       signing packages with GNU gpg.
274 #
275 #%_gpg_name
276 #%_gpg_path
277
278 #       The port and machine name of an HTTP proxy host.
279 #
280 #%_httpport
281 #%_httpproxy
282
283 #       The PATH put into the environment before running %pre/%post et al.
284 #
285 %_install_script_path   /sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin
286
287 #       A colon separated list of desired locales to be installed;
288 #       "all" means install all locale specific files.
289 #       
290 %_install_langs all
291
292 #       The value of CLASSPATH in build scriptlets (iff configured).
293 #       
294 #%_javaclasspath        all
295
296 #       Import packaging conventions from jpackage.org (prefixed with _
297 #       to avoid name collisions).
298 #       
299 %_javadir      %{_datadir}/java
300 %_javadocdir   %{_datadir}/javadoc
301
302 #       A colon separated list of paths where files should *not* be installed.
303 #       Usually, these are network file system mount points.
304 #
305 #%_netsharedpath
306
307 #       (experimental)
308 #       The type of pattern match used on rpmdb iterator selectors:
309 #       "default"       simple glob-like regex, periods will be escaped,
310 #                       splats will have period prepended, full "^...$" match
311 #                       required. Also, file path tags will use glob(7).
312 #       "strcmp"        compare strings
313 #       "regex"         regex(7) patterns using regcomp(3)/regexec(3)
314 #       "glob"          glob(7) patterns using fnmatch(3)
315 #
316 %_query_selector_match  default
317
318 #       Configurable packager information, same as Packager: in a specfile.
319 #
320 #%packager
321
322 #       Compression type and level for source/binary package payloads.
323 #               "w9.gzdio"      gzip level 9 (default).
324 #               "w9.bzdio"      bzip2 level 9.
325 #               "w7.lzdio"      lzma level 7, lzma's default.
326 #
327 #%_source_payload       w9.gzdio
328 #%_binary_payload       w9.gzdio
329
330 #       Algorithm to use for generating file checksum digests on build.
331 #       If not specified or 0, MD5 is used.
332 #       WARNING: non-MD5 is backwards incompatible, don't enable lightly!
333 #       The supported algorithms may depend on NSS version, as of NSS
334 #       3.11.99.5 the following are supported:
335 #       1       MD5 (default)
336 #       2       SHA1
337 #       8       SHA256
338 #       9       SHA384
339 #       10      SHA512
340 #
341 #%_source_filedigest_algorithm  1
342 #%_binary_filedigest_algorithm  1
343
344 #       The signature to use and the location of configuration files for
345 #       signing packages with PGP.
346 #
347 #%_pgp_name
348 #%_pgp_path
349
350 #       Configurable vendor information, same as Vendor: in a specfile.
351 #
352 #%vendor
353
354 #       Default fuzz level for %patch in spec file.
355 %_default_patch_fuzz    0
356
357 #       Default patch flags
358 %_default_patch_flags   -s
359
360 #==============================================================================
361 # ---- Build configuration macros.
362 #
363 # Script gets packaged file list on input and buildroot as first parameter.
364 # Returns list of unpackaged files, i.e. files in $RPM_BUILD_ROOT not packaged.
365 #
366 # Note: Disable (by commenting out) for legacy compatibility.
367 %__check_files         @RPMCONFIGDIR@/check-files %{buildroot}
368
369 #
370 # Should unpackaged files in a build root terminate a build?
371 #
372 # Note: The default value should be 0 for legacy compatibility.
373 %_unpackaged_files_terminate_build      1
374
375 #
376 # Should missing %doc files in the build directory terminate a build?
377 #
378 # Note: The default value should be 0 for legacy compatibility.
379 %_missing_doc_files_terminate_build     1
380
381 #
382 # Program to call for each successfully built and written binary package.
383 # The package name is passed to the program as a command-line argument.
384 #
385 #%_build_pkgcheck       %{_bindir}/rpmlint
386
387 #
388 # Program to call for the whole binary package set after build.
389 # The package set is passed to the program via command-line arguments.
390 #
391 #%_build_pkgcheck_set   %{_bindir}/rpmlint
392
393 #
394 # Program to call for successfully built and written SRPM.
395 # The package name is passed to the program as a command-line argument.
396 #
397 #%_build_pkgcheck_srpm  %{_bindir}/rpmlint
398
399 #
400 # Should the build of packages fail if package checker (if defined) returns
401 # non-zero exit status?
402 #
403 #%_nonzero_exit_pkgcheck_terminate_build        1
404
405 #
406 # Should an ELF file processed by find-debuginfo.sh having no build ID
407 # terminate a build?  This is left undefined to disable it and defined to
408 # enable.
409 #
410 #%_missing_build_ids_terminate_build    1
411
412 #
413 # Use internal dependency generator rather than external helpers?
414 %_use_internal_dependency_generator     1
415
416 #
417 # Filter GLIBC_PRIVATE Provides: and Requires:
418 %_filter_GLIBC_PRIVATE                  0
419
420 # Desired selinux policy tree
421 %__policy_tree  %{expand:%%global __policy_tree %{lua:\
422 t="targeted"\
423 f = io.open("/etc/selinux/config")\
424 if f then\
425   for l in f:lines() do\
426     if "SELINUXTYPE=" == string.sub(l,0,12) then t=string.sub(l,13); end\
427   end\
428   f:close()\
429 end\
430 print (t)\
431 }}%{__policy_tree}
432
433 # Path to selinux file context patterns.
434 %__file_context_path /etc/selinux/%{__policy_tree}/contexts/files/file_contexts
435
436 # Directories whose contents should be considered as documentation.
437 %__docdir_path %{_datadir}/doc:%{_datadir}/man:%{_datadir}/info:%{_datadir}/gtk-doc/html:%{?_docdir}:%{?_mandir}:%{?_infodir}:%{?_javadocdir}:/usr/doc:/usr/man:/usr/info:/usr/X11R6/man
438
439 #
440 # Path to selinux file context patterns used to add
441 # RPMTAG_FILECONTEXTS to packages when building.
442 #
443 # Undefined, missing or %{nil} will disable.
444 %_build_file_context_path       %{nil}
445
446 #
447 # Path to selinux file context patterns used to set
448 # (or override package content) file contexts when installing.
449 #
450 # Undefined, missing or %{nil} will use package content (if available).
451 %_install_file_context_path     %{__file_context_path}
452
453 #
454 # Path to selinux file context patterns used to verify
455 # file contexts on file system.
456 #
457 # Undefined, missing or %{nil} will use package content (if available).
458 %_verify_file_context_path      %{__file_context_path}
459
460 #
461 # Path to scripts to autogenerate package dependencies,
462 #
463 # Note: Used iff _use_internal_dependency_generator is zero.
464 #%__find_provides       @RPMCONFIGDIR@/rpmdeps --provides
465 #%__find_requires       @RPMCONFIGDIR@/rpmdeps --requires
466 %__find_provides        @RPMCONFIGDIR@/find-provides
467 %__find_requires        @RPMCONFIGDIR@/find-requires
468 #%__find_conflicts      ???
469 #%__find_obsoletes      ???
470
471 #
472 # Path to scripts to autogenerate per-interpreter package dependencies,
473 #
474 # Note: Used iff _use_internal_dependency_generator is non-zero. The
475 # helpers are also used by @RPMCONFIGDIR@/rpmdeps {--provides|--requires}.
476 #%__perl_provides       @RPMCONFIGDIR@/perldeps.pl --provides
477 #%__perl_requires       @RPMCONFIGDIR@/perldeps.pl --requires
478 %__perl_provides        @RPMCONFIGDIR@/perl.prov
479 %__perl_requires        @RPMCONFIGDIR@/perl.req
480
481 %__python_provides      @RPMCONFIGDIR@/pythondeps.sh --provides
482 %__python_requires      @RPMCONFIGDIR@/pythondeps.sh --requires
483
484 %__mono_provides        @RPMCONFIGDIR@/mono-find-provides %{_builddir}/%{?buildsubdir} %{buildroot} %{_libdir}
485 %__mono_requires        @RPMCONFIGDIR@/mono-find-requires %{_builddir}/%{?buildsubdir} %{buildroot} %{_libdir}
486
487 %__libtool_provides     @RPMCONFIGDIR@/libtooldeps.sh --provides %{buildroot} %{name}
488 %__libtool_requires     @RPMCONFIGDIR@/libtooldeps.sh --requires %{buildroot} %{name}
489
490 %__pkgconfig_provides   @RPMCONFIGDIR@/pkgconfigdeps.sh --provides
491 %__pkgconfig_requires   @RPMCONFIGDIR@/pkgconfigdeps.sh --requires
492
493 #==============================================================================
494 # ---- Database configuration macros.
495 #       Macros used to configure Berkley db parameters.
496 #
497 # rpmdb macro configuration values are a colon (or white space) separated
498 # list of tokens, with an optional '!' negation to explicitly disable bit
499 # values, or a "=value" if a parameter. A per-tag value is used (e.g.
500 # %_dbi_config_Packages) if defined, otherwise a per-rpmdb default
501 # (e.g. %_dbi_config). The configuration is also conditioned on the
502 # existence of an internal %{_rpmdb_rebuild} switch to permit changing
503 # the configuration while rebuilding an rpmdb database.
504 #
505 # The rpmdb configuration tokens are in a popt table in rpmdb/dbconfig.c,
506 # see that for the latest gory details. Note carefully that, unless you
507 # are writing an rpm installer, you shouldn't have to touch *any* of these
508 # parameters.
509 #
510 # Here's a short list of the tokens, with a guess of whether the option is
511 # useful:
512 #       (nothing)       currently used in rpm, known to work.
513 #       "+++"           under development, will be supported in rpm eventually.
514 #       "???"           I have no clue, you're mostly on your own.
515 #
516 # If you do find yourself inclined to fiddle, here's what I see (shrug):
517 # 1) Only the value of mp_size has any serious impact on overall performance,
518 #    and you will need ~256Kb to handle a typical machine install.
519 # 2) Only the Packages hash, because of the size of the values (i.e. headers),
520 #    will ever need tuning. Diddle the pagesize if you're interested, although
521 #    I believe that you will find pagesize=512 "best".
522 # 3) Adding nofsync increases speed, but risks total data loss. Fiddle shared
523 #    and/or mp_size instead.
524 # 4) btree is faster than hash, but would require some painful rpm release
525 #    engineering to convert everbody's databases to btree, not gonna happen
526 #    soon.
527 #
528 # See the db3-devel package, or http://www.sleepycat.com for Berkeley db-3.x
529 # documentation.
530 #
531 #   token       works?  Berkeley db flag or value
532 #==================================================
533 #---------------------- DBENV->open parameters and tunable values:
534 #   mmapsize=16Mb       DBENV->set_mp_mmapsize
535 #   cachesize=1Mb       DBENV->set_cachesize, DB->set_cachesize
536 #---------------------- DBENV->open and DB->open common bits:
537 #   create              DB_CREATE
538 #   thread      ???     DB_THREAD       (useless w/o posix mutexes on linux)
539 #---------------------- DBENV->open bits:
540 #   joinenv             DB_JOIN_ENV
541 #   mpool               DB_INIT_MPOOL
542 #   cdb         +++     DB_INIT_CDB
543 #   txn         ???     DB_INIT_TXN
544 #   log         ???     DB_INIT_LOG
545 #   lock        ???     DB_INIT_LOCK
546 #   recover     ???     DB_RECOVER
547 #   recover_fatal ???   DB_RECOVER_FATAL
548 #   use_environ ???     DB_USE_ENVIRON
549 #   use_environ_root ??? DB_USE_ENVIRON_ROOT
550 #   private     +++     DB_PRIVATE
551 #   lockdown    ???     DB_LOCKDOWN
552 #   shared      +++     DB_SYSTEM_MEM
553 #---------------------- DB->open parameters and tunable values:
554 #   pagesize=512 +++    DB->set_pagesize
555 #---------------------- DB->open bits:
556 #   excl        ???     DB_EXCL
557 #   nommap      ???     DB_NOMMAP
558 #   rdonly              DB_RDONLY
559 #---------------------- DB->open types:
560 #   btree               DB_BTREE
561 #   hash                DB_HASH
562 #   recno       ???     DB_RECNO
563 #   queue       ???     DB_QUEUE
564 #   unknown     +++     DB_UNKNOWN
565 #---------------------- DB->set_flags bits:
566 #   bt_dup      +++     (btree only) DB_DUP
567 #   bt_dupsort  +++     (btree only) DB_DUPSORT
568 #   ht_dup      +++     (hash only) DB_DUP
569 #   ht_dupsort  +++     (hash only) DB_DUPSORT
570 #----------------------- rpmdb specific configuration:
571 #   usedbenv            (always on) Use db3 environment?
572 #   verify              (db3 only) Verify Packages db after RW close?
573 #   lockdbfd            (always on for Packages) Use fcntl(2) locking ?
574 #   nofsync             Disable fsync(2) call performed after db3 writes?
575 #   temporary           Unlink file when closing.
576 #
577
578 # XXX Use transactions and logs for rpmdb durability (no clue yet):
579 #%__dbi_other                   create joinenv mpool txn log \
580 #                               mp_mmapsize=8Mb mp_size=512Kb
581
582 # Use a CDB database model for concurrent access.
583 # XXX Add "private" here for legacy interoperation transiting to glibc+nptl.
584 %__dbi_cdb                      create cdb mpool mp_mmapsize=16Mb mp_size=1Mb
585
586 %__dbi_other                    %{?_tmppath:tmpdir=%{_tmppath}} %{?__dbi_cdb}
587
588 # Note: adding nofsync here speeds up --rebuilddb a lot.
589 %__dbi_rebuild                  nofsync !log !txn !cdb
590 %__dbi_transient                %{__dbi_rebuild} temporary private
591 %__dbi_perms                    perms=0644
592
593 #
594 #--- Hash database configuration
595 %__dbi_htconfig \
596   hash          \
597   %{__dbi_other}\
598   %{__dbi_perms}\
599 %{nil}
600
601 %__dbi_htconfig_current         %{__dbi_htconfig}
602 %__dbi_htconfig_rebuild         %{__dbi_htconfig} %{__dbi_rebuild}
603
604 %_dbi_htconfig          \
605   %{?_rpmdb_rebuild:%{__dbi_htconfig_rebuild}}\
606   %{!?_rpmdb_rebuild:%{__dbi_htconfig_current}}\
607 %{nil}
608
609 #
610 #--- Btree database configuration
611 %__dbi_btconfig \
612   btree         \
613   %{__dbi_other}\
614   %{__dbi_perms}\
615 %{nil}
616
617 %__dbi_btconfig_current         %{__dbi_btconfig}
618 %__dbi_btconfig_rebuild         %{__dbi_btconfig} %{__dbi_rebuild}
619
620 %_dbi_btconfig          \
621   %{?_rpmdb_rebuild:%{__dbi_btconfig_rebuild}}\
622   %{!?_rpmdb_rebuild:%{__dbi_btconfig_current}}\
623 %{nil}
624
625 # The list of tags for which indices will be built.
626 %_dbi_tags      Packages:Name:Basenames:Group:Requirename:Providename:Conflictname:Triggername:Dirnames:Requireversion:Provideversion:Installtid:Sigmd5:Sha1header:Filemd5s:Depends:Pubkeys
627
628 # "Packages" should have shared/exclusive fcntl(2) lock using "lockdbfd".
629 %_dbi_config_Packages           %{_dbi_htconfig} lockdbfd
630
631 # "Depends" is a per-transaction cache of known dependency resolutions.
632 %_dbi_config_Depends            %{_dbi_htconfig} temporary private
633
634 %_dbi_config_Dirnames           %{_dbi_btconfig}
635 %_dbi_config_Requireversion     %{_dbi_btconfig}
636 %_dbi_config_Provideversion     %{_dbi_btconfig}
637 %_dbi_config_Installtid         %{_dbi_btconfig}
638 %_dbi_config_Removetid          %{_dbi_btconfig}
639
640 %_dbi_config    %{_dbi_htconfig}
641
642 # XXX legacy configuration.
643 # Choose db interface:
644 #       3       native db3 interface.
645 #
646 # There are two macros so that --rebuilddb can convert db1 -> db3.
647 #
648 %_dbapi                 3
649 %_dbapi_rebuild         3
650
651 #==============================================================================
652 # ---- GPG/PGP/PGP5 signature macros.
653 #       Macro(s) to hold the arguments passed to GPG/PGP for package
654 #       signing and verification.
655 #
656 %__gpg_check_password_cmd       %{__gpg} \
657         gpg --batch --no-verbose --passphrase-fd 3 -u "%{_gpg_name}" -so -
658 %__pgp_check_password_cmd       %{__pgp} \
659         pgp +batchmode=on +verbose=0 "%{_pgp_name}" -sf
660 %__pgp5_check_password_cmd      %{__pgp} \
661         pgps +batchmode=on +verbose=0 +armor=off "%{_pgp_name}" -f
662
663 %__gpg_sign_cmd                 %{__gpg} \
664         gpg --batch --no-verbose --no-armor --passphrase-fd 3 --no-secmem-warning \
665         -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}
666 %__pgp_sign_cmd                 %{__pgp} \
667         pgp +batchmode=on +verbose=0 +armor=off \
668         "+myname=%{_pgp_name}" -sb %{__plaintext_filename} %{__signature_filename}
669 %__pgp5_sign_cmd                %{__pgp} \
670         pgps +batchmode=on +verbose=0 +armor=off \
671         "+myname=%{_pgp_name}" -b %{__plaintext_filename} -o %{__signature_filename}
672
673 # XXX rpm >= 4.1 verifies signatures internally
674 #%__gpg_verify_cmd              %{__gpg} \
675 #       gpg --batch --no-verbose --verify --no-secmem-warning \
676 #       %{__signature_filename} %{__plaintext_filename}
677 #%__pgp_verify_cmd              %{__pgp} \
678 #       pgp +batchmode=on +verbose=0 \
679 #       %{__signature_filename} %{__plaintext_filename}
680 #%__pgp5_verify_cmd             %{__pgp} \
681 #       pgpv +batchmode=on +verbose=0 \
682 #       +OutputInformationFD=1 +OutputWarningFD=1 \
683 #       -o %{__signature_filename} %{__plaintext_filename}
684
685 #
686 # XXX rpm-4.1 verifies prelinked libraries using a prelink undo helper.
687 #       Normally this macro is defined in /etc/rpm/macros.prelink, installed
688 #       with the prelink package. If the macro is undefined, then prelinked
689 #       shared libraries contents are MD5 digest verified (as usual), rather
690 #       than MD5 verifying the output of the prelink undo helper.
691 #
692 #       Note: The 2nd token is used as argv[0] and "library" is a
693 #       placeholder that will be deleted and replaced with the appropriate
694 #       library file path.
695 #%__prelink_undo_cmd     /usr/sbin/prelink prelink -y library
696
697 # Horowitz Key Protocol server configuration
698 #
699 %_hkp_keyserver         http://pgp.mit.edu
700 %_hkp_keyserver_query   %{_hkp_keyserver}:11371/pks/lookup?op=get&search=0x
701
702 #==============================================================================
703 # ---- Transaction macros.
704 #       Macro(s) used to parameterize transactions.
705 #
706 #       The output binary package file name template used when building
707 #       binary packages.
708 #
709 # XXX   Note: escaped %% for use in headerSprintf()
710 %_build_name_fmt        %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
711
712 #       The default transaction color. This value is a set of bits to
713 #       determine file and dependency affinity for this arch.
714 #               0       uncolored (i.e. use only arch as install hint)
715 #               1       Elf32 permitted
716 #               2       Elf64 permitted
717 %_transaction_color     @RPMCANONCOLOR@
718
719 #       Verify digest/signature flags for various rpm modes:
720 #       0x30300 (_RPMVSF_NODIGESTS)    --nohdrchk      if set, don't check digest(s)
721 #       0xc0c00 (_RPMVSF_NOSIGNATURES) --nosignature   if set, don't check signature(s)
722 #       0xf0000 (_RPMVSF_NOPAYLOAD)    --nolegacy      if set, check header+payload (if possible)
723 #       0x00f00 (_RPMVSF_NOHEADER)     --nohdrchk      if set, don't check rpmdb headers
724 #
725 #       For example, the value 0xf0c00 (=0xf0000+0xc0c00) disables legacy
726 #       digest/signature checking, disables signature checking, but attempts
727 #       digest checking, also when retrieving headers from the database.
728 #
729 #       You also can do:
730 #        >>> hex(rpm._RPMVSF_NOSIGNATURES)
731 #        '0xc0c00'
732 #       or:
733 #        >>> hex(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NOPAYLOAD)
734 #        '0xf0c00'
735 #       at the python prompt for example, after "import rpm".
736 #
737 #       The checking overhead is ~11ms per header for digests/signatures;
738 #       each header from the database is checked only when first encountered
739 #       for each database open.
740 #
741 #       Note: the %_vsflags_erase applies to --upgrade/--freshen modes as
742 #       well as --erase.
743 #
744 %__vsflags              0xf0000
745 %_vsflags_build         %{__vsflags}
746 %_vsflags_erase         %{__vsflags}
747 %_vsflags_install       %{__vsflags}
748 %_vsflags_query         %{__vsflags}
749 %_vsflags_rebuilddb     %{__vsflags}
750 %_vsflags_verify        %{__vsflags}
751
752 #       Relations between package names that cause dependency loops
753 #       with legacy packages that cannot be fixed. Relations are
754 #       specified as
755 #               p>q
756 #       where package p has a Requires: on something that package q Provides:
757 #
758 # XXX   Note: that there cannot be any whitespace within the string "p>q",
759 #       and that both p and q are package names (i.e. no version/release).
760 #
761
762 %_dependency_whiteout                   \
763         %{nil}
764
765 #
766 # Default headerSprintf() output format string for rpm -qa
767 #
768 # XXX   Note: escaped %% for use in headerSprintf()
769 %_query_all_fmt         %%{name}-%%{version}-%%{release}%%|arch?{.%%{arch}}:{}|
770
771 #
772 # Default path to the file used for transaction fcmtl lock.
773 #
774 # The previous, FHS clompliant, name was /var/lock/run/transaction,
775 # but the transaction lock needs to be per-database, not global, for
776 # some rpmdb operations.
777 #
778 # XXX Note: the file name is chosen as __db.000 to expedite
779 # support issues, many users are doing "rm -f /var/lib/rpm/__db*"
780 # these days.
781 %_rpmlock_path  %{_dbpath}/__db.000
782
783 #==============================================================================
784 # ---- per-platform macros.
785 #       Macros that are specific to an individual platform. The values here
786 #       will be used if the per-platform macro file does not exist..
787 #
788 %_arch                  @RPMCANONARCH@
789 %_build_arch            @RPMCANONARCH@
790 %_vendor                @RPMCANONVENDOR@
791 %_os                    @RPMCANONOS@
792 %_gnu                   @RPMCANONGNU@
793 %_target_platform       %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}
794
795 #
796 # Define a generic value for optflags. Normally overridden by per-target macros.
797 %optflags               -O2
798
799 #
800 # ISA dependency marker, none for noarch and name-bitness for others
801 %_isa                   %{?__isa:(%{__isa})}%{!?__isa:%{nil}}
802
803 #
804 # Define per-arch and per-os defaults. Normally overridden by per-target macros.
805 %__arch_install_post    %{nil}
806 %__os_install_post      %{___build_post}
807
808 #==============================================================================
809 # ---- Scriptlet template templates.
810 #       Global defaults used for building scriptlet templates.
811 #
812
813 %___build_shell         %{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh}
814 %___build_args          -e
815 %___build_cmd           %{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args}
816 %___build_pre   \
817   RPM_SOURCE_DIR=\"%{u2p:%{_sourcedir}}\"\
818   RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\
819   RPM_OPT_FLAGS=\"%{optflags}\"\
820   RPM_ARCH=\"%{_arch}\"\
821   RPM_OS=\"%{_os}\"\
822   export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS\
823   RPM_DOC_DIR=\"%{_docdir}\"\
824   export RPM_DOC_DIR\
825   RPM_PACKAGE_NAME=\"%{name}\"\
826   RPM_PACKAGE_VERSION=\"%{version}\"\
827   RPM_PACKAGE_RELEASE=\"%{release}\"\
828   export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE\
829   %{?buildroot:RPM_BUILD_ROOT=\"%{u2p:%{buildroot}}\"\
830   export RPM_BUILD_ROOT}\
831   %{?_javaclasspath:CLASSPATH=\"%{_javaclasspath}\"\
832   export CLASSPATH}\
833   \
834   %{verbose:set -x}%{!verbose:exec > /dev/null}\
835   umask 022\
836   cd \"%{u2p:%{_builddir}}\"\
837
838
839 #%___build_body         %{nil}
840 %___build_post          exit 0
841
842 %___build_template      #!%{___build_shell}\
843 %{___build_pre}\
844 %{nil}
845
846 #%{___build_body}\
847 #%{___build_post}\
848 #%{nil}
849
850 #==============================================================================
851 # ---- Scriptlet templates.
852 #       Macro(s) that expand to a command and script that is executed.
853 #       CAVEAT: All macro expansions must fit in a BUFSIZ (8192 byte) buffer.
854 #
855 %__spec_prep_shell      %{___build_shell}
856 %__spec_prep_args       %{___build_args}
857 %__spec_prep_cmd        %{___build_cmd}
858 %__spec_prep_pre        %{___build_pre}
859 %__spec_prep_body       %{___build_body}
860 %__spec_prep_post       %{___build_post}
861 %__spec_prep_template   #!%{__spec_prep_shell}\
862 %{__spec_prep_pre}\
863 %{nil}
864
865 #%{__spec_prep_body}\
866 #%{__spec_prep_post}\
867 #%{nil}
868
869 %__spec_build_shell     %{___build_shell}
870 %__spec_build_args      %{___build_args}
871 %__spec_build_cmd       %{___build_cmd}
872 %__spec_build_pre       %{___build_pre}
873 %__spec_build_body      %{___build_body}
874 %__spec_build_post      %{___build_post}
875 %__spec_build_template  #!%{__spec_build_shell}\
876 %{__spec_build_pre}\
877 %{nil}
878
879 #%{__spec_build_body}\
880 #%{__spec_build_post}\
881 #%{nil}
882
883 %__spec_install_shell   %{___build_shell}
884 %__spec_install_args    %{___build_args}
885 %__spec_install_cmd     %{___build_cmd}
886 %__spec_install_pre     %{___build_pre}
887 %__spec_install_body    %{___build_body}
888 %__spec_install_post\
889 %{?__debug_package:%{__debug_install_post}}\
890 %{__arch_install_post}\
891 %{__os_install_post}\
892 %{nil}
893 %__spec_install_template        #!%{__spec_install_shell}\
894 %{__spec_install_pre}\
895 %{nil}
896
897 #%{__spec_install_body}\
898 #%{__spec_install_post}\
899 #%{nil}
900
901 %__spec_check_shell     %{___build_shell}
902 %__spec_check_args      %{___build_args}
903 %__spec_check_cmd       %{___build_cmd}
904 %__spec_check_pre       %{___build_pre}
905 %__spec_check_body      %{___build_body}
906 %__spec_check_post      %{___build_post}
907 %__spec_check_template  #!%{__spec_check_shell}\
908 %{__spec_check_pre}\
909 %{nil}
910
911 #%{__spec_check_body}\
912 #%{__spec_check_post}\
913 #%{nil}
914
915 #%__spec_autodep_shell  %{___build_shell}
916 #%__spec_autodep_args   %{___build_args}
917 #%__spec_autodep_cmd    %{___build_cmd}
918 #%__spec_autodep_pre    %{___build_pre}
919 #%__spec_autodep_body   %{___build_body}
920 #%__spec_autodep_post   %{___build_post}
921 #%__spec_autodep_template       #!%{__spec_autodep_shell}\
922 #%{__spec_autodep_pre}\
923 #%{nil}
924
925 #%{__spec_autodep_body}\
926 #%{__spec_autodep_post}\
927 #%{nil}
928
929 %__spec_clean_shell     %{___build_shell}
930 %__spec_clean_args      %{___build_args}
931 %__spec_clean_cmd       %{___build_cmd}
932 %__spec_clean_pre       %{___build_pre}
933 %__spec_clean_body      %{___build_body}
934 %__spec_clean_post      %{___build_post}
935 %__spec_clean_template  #!%{__spec_clean_shell}\
936 %{__spec_clean_pre}\
937 %{nil}
938
939 #%{__spec_clean_body}\
940 #%{__spec_clean_post}\
941 #%{nil}
942
943 %__spec_rmbuild_shell   %{___build_shell}
944 %__spec_rmbuild_args    %{___build_args}
945 %__spec_rmbuild_cmd     %{___build_cmd}
946 %__spec_rmbuild_pre     %{___build_pre}
947 %__spec_rmbuild_body    %{___build_body}
948 %__spec_rmbuild_post    %{___build_post}
949 %__spec_rmbuild_template        #!%{__spec_rmbuild_shell}\
950 %{__spec_rmbuild_pre}\
951 %{nil}
952
953 #%{__spec_rmbuild_body}\
954 #%{__spec_rmbuild_post}\
955 #%{nil}
956
957 # XXX We don't expand pre/post install scriptlets (yet).
958 #%__spec_pre_pre                %{nil}
959 #%__spec_pre_post               %{nil}
960 #%__spec_post_pre               %{nil}
961 #%__spec_post_post              %{nil}
962 #%__spec_preun_pre              %{nil}
963 #%__spec_preun_post             %{nil}
964 #%__spec_postun_pre             %{nil}
965 #%__spec_postun_post            %{nil}
966 #%__spec_triggerpostun_pre      %{nil}
967 #%__spec_triggerpostun_post     %{nil}
968 #%__spec_triggerun_pre          %{nil}
969 #%__spec_triggerun_post         %{nil}
970 #%__spec_triggerin_pre          %{nil}
971 #%__spec_triggerin_post         %{nil}
972
973 #==============================================================================
974 # ---- configure macros.
975 #       Macro(s) slavishly copied from autoconf's config.status.
976 #
977 %_prefix                @prefix@
978 %_exec_prefix           %{_prefix}
979 %_bindir                %{_exec_prefix}/bin
980 %_sbindir               %{_exec_prefix}/sbin
981 %_libexecdir            %{_exec_prefix}/libexec
982 %_datadir               %{_prefix}/share
983 %_sysconfdir            /etc
984 %_sharedstatedir        %{_prefix}/com
985 %_localstatedir         %{_prefix}/var
986 %_lib                   lib
987 %_libdir                %{_exec_prefix}/%{_lib}
988 %_includedir            %{_prefix}/include
989 %_infodir               %{_datadir}/info
990 %_mandir                %{_datadir}/man
991
992 #==============================================================================
993 # ---- config.guess platform macros.
994 #       Macro(s) similar to the tokens used by configure.
995 #
996 %_build                 %{_host}
997 %_build_alias           %{_host_alias}
998 %_build_cpu             %{_host_cpu}
999 %_build_vendor          %{_host_vendor}
1000 %_build_os              %{_host_os}
1001 %_host                  @host@
1002 %_host_alias            @host_alias@%{nil}
1003 %_host_cpu              @host_cpu@
1004 %_host_vendor           @host_vendor@
1005 %_host_os               @host_os@
1006 %_target                %{_host}
1007 %_target_alias          %{_host_alias}
1008 %_target_cpu            %{_host_cpu}
1009 %_target_vendor         %{_host_vendor}
1010 %_target_os             %{_host_os}
1011
1012 #==============================================================================
1013 # ---- specfile macros.
1014 #       Macro(s) here can be used reliably for reproducible builds.
1015 #       (Note: Above is the goal, below are the macros under development)
1016 #
1017 # The configure macro does the following:
1018 #       optionally change to a subdirectory (not implemented).
1019 #       attempt to update config.guess and config.sub.
1020 #       run configure with correct prefix, platform, and CFLAGS.
1021 #       optionally restore current directory (not implemented).
1022 # The configure macro should be invoked as %configure (rather than %{configure})
1023 # because the rest of the arguments will be expanded using %*.
1024 #
1025 # This is the version of %configure used through rpm-3.0.4.
1026 #%configure     \
1027 #  %{?__libtoolize:[ -f configure.in ] && %{__libtoolize} --copy --force} \
1028 #  CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix}
1029 #
1030 #------------------------------------------------------------------------------
1031 # This is an improved version of %configure (from PLD team).
1032 %_configure ./configure
1033 %configure \
1034   CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
1035   CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
1036   FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
1037   %{_configure} --host=%{_host} --build=%{_build} \\\
1038         --target=%{_target_platform} \\\
1039         --program-prefix=%{?_program_prefix} \\\
1040         --prefix=%{_prefix} \\\
1041         --exec-prefix=%{_exec_prefix} \\\
1042         --bindir=%{_bindir} \\\
1043         --sbindir=%{_sbindir} \\\
1044         --sysconfdir=%{_sysconfdir} \\\
1045         --datadir=%{_datadir} \\\
1046         --includedir=%{_includedir} \\\
1047         --libdir=%{_libdir} \\\
1048         --libexecdir=%{_libexecdir} \\\
1049         --localstatedir=%{_localstatedir} \\\
1050         --sharedstatedir=%{_sharedstatedir} \\\
1051         --mandir=%{_mandir} \\\
1052         --infodir=%{_infodir}
1053
1054 #------------------------------------------------------------------------------
1055 # The make install analogue of %configure:
1056 %makeinstall \
1057   make \\\
1058         prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\
1059         exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\
1060         bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\
1061         sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\
1062         sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\
1063         datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\
1064         includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\
1065         libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\
1066         libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\
1067         localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\
1068         sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\
1069         mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\
1070         infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\
1071   install
1072
1073 #------------------------------------------------------------------------------
1074 # The GNUconfigure macro does the following:
1075 #       update config.guess and config.sub.
1076 #       regenerate all autoconf/automake files
1077 #       optionally change to a directory (make the directory if requested).
1078 #       run configure with correct prefix, platform, and CFLAGS.
1079 #       optionally restore current directory.
1080 #
1081 # Based on autogen.sh from GNOME and orginal GNUconfigure
1082 #
1083 %GNUconfigure(MCs:)      \
1084   CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS; \
1085   LDFLAGS="${LDFLAGS:-%{-s:-s}}"  ; export LDFLAGS; \
1086   %{-C:_mydir="`pwd`"; %{-M: %{__mkdir} -p %{-C*};} cd %{-C*}} \
1087   dirs="`find ${_mydir} -name configure.in -print`"; export dirs; \
1088     for coin in `echo ${dirs}` \
1089 do \
1090   dr=`dirname ${coin}`; \
1091 if test -f ${dr}/NO-AUTO-GEN; then \
1092  : \
1093 else \
1094      macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < ${coin}`; \
1095     ( cd ${dr}; \
1096       aclocalinclude="${ACLOCAL_FLAGS}"; \
1097       for k in ${macrodirs}; do \
1098         if test -d ${k}; then \
1099           aclocalinclude="${aclocalinclude} -I ${k}"; \
1100         ##else \
1101         ##  echo "**Warning**: No such directory \`${k}'.  Ignored." \
1102         fi \
1103       done \
1104       if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then \
1105         if grep "sed.*POTFILES" configure.in >/dev/null; then \
1106           : do nothing -- we still have an old unmodified configure.in \
1107         else \
1108           test -r ${dr}/aclocal.m4 || touch ${dr}/aclocal.m4; \
1109           echo "no" | gettextize --force --copy; \
1110           test -r ${dr}/aclocal.m4 && %{__chmod} u+w ${dr}/aclocal.m4; \
1111         fi \
1112       fi \
1113       if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then \
1114         %{__libtoolize} --force --copy; \
1115       fi \
1116       aclocal ${aclocalinclude}; \
1117       if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then \
1118         %{__autoheader}; \
1119       fi \
1120       echo "Running automake --gnu ${am_opt} ..."; \
1121       %{__automake} --add-missing --gnu ${am_opt}; \
1122       %{__autoconf}; \
1123     ); \
1124   fi \
1125 done \
1126   %{-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} %* ; \
1127   %{-C:cd ${_mydir}; unset _mydir}
1128
1129 %patches %{lua: for i, p in ipairs(patches) do print(p.." ") end}
1130 %sources %{lua: for i, s in ipairs(sources) do print(s.." ") end}
1131
1132 #------------------------------------------------------------------------------
1133 # Useful perl macros (from Artur Frysiak <wiget@t17.ds.pwr.wroc.pl>)
1134 #
1135 # For example, these can be used as (from ImageMagick.spec from PLD site)
1136 #       [...]
1137 #       BuildPrereq: perl
1138 #       [...]
1139 #       %package perl
1140 #       Summary: libraries and modules for access to ImageMagick from perl
1141 #       Group: Development/Languages/Perl
1142 #       Requires: %{name} = %{version}
1143 #       %requires_eq    perl
1144 #       [...]
1145 #       %install
1146 #       rm -fr $RPM_BUILD_ROOT
1147 #       install -d $RPM_BUILD_ROOT/%{perl_sitearch}
1148 #       [...]
1149 #       %files perl
1150 #       %defattr(644,root,root,755)
1151 #       %{perl_sitearch}/Image
1152 #       %dir %{perl_sitearch}/auto/Image
1153 #
1154 %requires_eq()  %(LC_ALL="C" echo '%*' | xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")
1155 %perl_sitearch  %(eval "`%{__perl} -V:installsitearch`"; echo $installsitearch)
1156 %perl_sitelib   %(eval "`%{__perl} -V:installsitelib`"; echo $installsitelib)
1157 %perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)
1158 %perl_vendorlib  %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)
1159 %perl_archlib   %(eval "`%{__perl} -V:installarchlib`"; echo $installarchlib)
1160 %perl_privlib   %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib)
1161
1162 #------------------------------------------------------------------------------
1163 # arch macro for all Intel i?86 compatibile processors
1164 #  (Note: This macro (and it's analogues) will probably be obsoleted when
1165 #   rpm can use regular expressions against target platforms in macro
1166 #   conditionals.
1167 #
1168 %ix86   i386 i486 i586 i686 pentium3 pentium4 athlon geode
1169
1170 #------------------------------------------------------------------------------
1171 # arch macro for all supported ARM processors
1172 %arm    armv3l armv4b armv4l armv4tl armv5tel armv5tejl armv6l
1173
1174 #------------------------------------------------------------------------------
1175 # arch macro for all supported Sparc processors
1176 %sparc sparc sparcv8 sparcv9 sparcv9v sparc64 sparc64v
1177
1178 #------------------------------------------------------------------------------
1179 # arch macro for all supported Alpha processors
1180 %alpha  alpha alphaev56 alphaev6 alphaev67
1181
1182 #------------------------------------------------------------------------
1183 # Use in %install to generate locale specific file lists. For example,
1184 #
1185 # %install
1186 # ...
1187 # %find_lang %{name}
1188 # ...
1189 # %files -f %{name}.lang
1190 #
1191 %find_lang      @RPMCONFIGDIR@/find-lang.sh %{buildroot}
1192
1193 # Commands + opts to use for retrieving remote files
1194 %__urlhelpercmd         @__CURL@
1195 %__urlhelperopts        --silent --show-error --fail --location -o
1196 %_urlhelper             %{__urlhelpercmd} %{__urlhelperopts}
1197
1198
1199 # \endverbatim
1200 #*/