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