home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 March / PCWELT_3_2006.ISO / base / 05_common.mo / usr / lib / rpm / macros < prev    next >
Encoding:
Text File  |  2003-10-29  |  35.8 KB  |  1,106 lines

  1. #/*! \page config_macros Default configuration: /usr/lib/rpm/macros
  2. # \verbatim
  3. #
  4. # $Id: macros.in,v 1.138.2.1 2003/07/02 19:14:06 jbj Exp $
  5. #
  6. # This is a global RPM configuration file. All changes made here will
  7. # be lost when the rpm package is upgraded. Any per-system configuration
  8. # should be added to /etc/rpm/macros, while per-user configuration should
  9. # be added to ~/.rpmmacros.
  10. #
  11. #==============================================================================
  12. # Macro naming conventions (preliminary):
  13. #
  14. #    Macros that begin with an underscore are "local" in the sense that
  15. #    they (if used) will not be exported in rpm headers. Some macros
  16. #    that don't start with an underscore (but look like they should)
  17. #    are compatible with macros generated by rpm-2.5.x and will be made
  18. #    more consistent in a future release.
  19. #
  20.  
  21. #==============================================================================
  22. # ---- A macro that expands to nothing.
  23. #
  24. %nil            %{!?nil}
  25.  
  26. #==============================================================================
  27. # ---- filesystem macros.
  28. #
  29. %_usr            /usr
  30. %_usrsrc        %{_usr}/src
  31. %_var            /var
  32.  
  33. #==============================================================================
  34. # ---- Generally useful path macros.
  35. #
  36. %__awk            gawk
  37. %__bzip2        /usr/bin/bzip2
  38. %__cat            /usr/bin/cat
  39. %__chgrp        /usr/bin/chgrp
  40. %__chmod        /usr/bin/chmod
  41. %__chown        /usr/bin/chown
  42. %__cp            /usr/bin/cp
  43. %__cpio            /bin/cpio
  44. %__file            /usr/bin/file
  45. %__gpg            /usr/bin/gpg
  46. %__grep            /usr/bin/grep
  47. %__gzip            /usr/bin/gzip
  48. %__id            /usr/bin/id
  49. %__install        /usr/bin/install
  50. %__ln_s            ln -s
  51. %__make            /usr/bin/make
  52. %__mkdir        /usr/bin/mkdir
  53. %__mkdir_p        /usr/bin/mkdir -p
  54. %__mv            /usr/bin/mv
  55. %__patch        /usr/bin/patch
  56. %__perl            /usr/bin/perl
  57. %__pgp            /usr/bin/pgp
  58. %__python        /usr/bin/python
  59. %__rm            /usr/bin/rm
  60. %__rsh            /usr/bin/rsh
  61. %__sed            /usr/bin/sed
  62. %__ssh            /usr/bin/ssh
  63. %__tar            /bin/tar
  64. %__unzip        /usr/bin/unzip
  65.  
  66. #==============================================================================
  67. # ---- Build system path macros.
  68. #
  69. %__ar            ar
  70. %__as            as
  71. %__cc            gcc
  72. %__cpp            gcc -E
  73. %__cxx            g++
  74. %__ld            /usr/bin/ld
  75. %__nm            /usr/bin/nm
  76. %__objcopy        /usr/bin/objcopy
  77. %__objdump        /usr/bin/objdump
  78. %__ranlib        ranlib
  79. %__remsh        %{__rsh}
  80. %__strip        /usr/bin/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. # ---- Required rpmrc macros.
  91. #    Macros that used to be initialized as a side effect of rpmrc parsing.
  92. #    These are the default values that can be overridden by other
  93. #    (e.g. per-platform, per-system, per-packager, per-package) macros.
  94. #
  95. #    The directory where sources/patches will be unpacked and built.
  96. %_builddir        %{_topdir}/BUILD
  97.  
  98. #    The interpreter used for build scriptlets.
  99. %_buildshell        /bin/sh
  100.  
  101. #    The path to the bzip2 executable (legacy, use %{__bzip2} instead).
  102. %_bzip2bin        %{__bzip2}
  103.  
  104. #    The location of the rpm database file(s).
  105. %_dbpath        %{_var}/lib/rpm
  106.  
  107. #    The location of the rpm database file(s) after "rpm --rebuilddb".
  108. %_dbpath_rebuild    %{_dbpath}
  109.  
  110. #
  111. #    Path to script that creates debug symbols in a /usr/lib/debug
  112. #    shadow tree.
  113. %__debug_install_post   \
  114.    /usr/lib/rpm/find-debuginfo.sh %{_builddir}/%{?buildsubdir}\
  115. %{nil}
  116.  
  117. #    Template for debug information sub-package.
  118. %debug_package \
  119. %ifnarch noarch\
  120. %global __debug_package 1\
  121. %package debug\
  122. Summary: Debug information for package %{name}\
  123. Group: Development/Debug\
  124. AutoReqProv: 0\
  125. %description debug\
  126. This package provides debug information for package %{name}.\
  127. Debug information is useful when developing applications that use this\
  128. package or when debugging this package.\
  129. %files debug -f debugfiles.list\
  130. %defattr(-,root,root)\
  131. %endif\
  132. %{nil}
  133.  
  134. %_defaultdocdir        %{_usr}/doc
  135.  
  136. #    The path to the gzip executable (legacy, use %{__gzip} instead).
  137. %_gzipbin        %{__gzip}
  138.  
  139. #    The number of changelog entries kept when installing (legacy, unused in
  140. #    rpm-4.0.1 and later).
  141. %_instchangelog        5
  142.  
  143. #    The path to the pgp executable (legacy, use %{__pgp} instead).
  144. %_pgpbin        %{__pgp}
  145.  
  146. #    The directory where newly built binary packages will be written.
  147. %_rpmdir        %{_topdir}/RPMS
  148.  
  149. #    A template used to generate the output binary package file name
  150. #    (legacy).
  151. %_rpmfilename        %{_build_name_fmt}
  152.  
  153. #    The default signature type.
  154. %_signature        none
  155.  
  156. #    The directory where sources/patches from a source package will be
  157. #    installed. This is also where sources/patches are found when building.
  158. %_sourcedir        %{_topdir}/SOURCES
  159.  
  160. #    The directory where the spec file from a source package will be
  161. #    installed.
  162. %_specdir        %{_topdir}/SPECS
  163.  
  164. #    The directory where newly built source packages will be written.
  165. %_srcrpmdir        %{_topdir}/SRPMS
  166.  
  167. #    Directory where temporaray files can be created.
  168. %_tmppath        %{_var}/tmp
  169.  
  170. #    Path to top of build area.
  171. %_topdir        %{_usrsrc}/rpm
  172.  
  173. #    The path to the unzip executable (legacy, use %{__unzip} instead).
  174. %_unzipbin        %{__unzip}
  175.  
  176. #==============================================================================
  177. # ---- Optional rpmrc macros.
  178. #    Macros that are initialized as a side effect of rpmrc and/or spec
  179. #    file parsing.
  180. #
  181. #    Configurable build root path, same as BuildRoot: in a specfile.
  182. #    (Note: the configured macro value will override the spec file value).
  183. #
  184. #%buildroot
  185.  
  186. #    The sub-directory (relative to %{_builddir}) where sources are compiled.
  187. #    This macro is set after processing %setup, either explicitly from the
  188. #    value given to -n or the default name-version.
  189. #
  190. #%buildsubdir
  191.  
  192. #    Configurable distribution information, same as Distribution: tag in a
  193. #    specfile.
  194. #
  195. #%distribution
  196.  
  197. #    Configurable distribution URL, same as DistURL: tag in a specfile.
  198. #    The URL will be used to supply reliable information to tools like
  199. #    rpmfind.
  200. #
  201. # Note: You should not configure with disturl (or build packages with
  202. # the DistURL: tag) unless you are willing to supply content in a
  203. # yet-to-be-determined format at the URL specified.
  204. #
  205. #%disturl
  206.  
  207. #    Boolean (i.e. 1 == "yes", 0 == "no") that controls whether files
  208. #    marked as %doc should be installed.
  209. #%_excludedocs
  210.  
  211. #    The port and machine name of a FTP proxy host running TIS firewall.
  212. #
  213. #%_ftpport
  214. #%_ftpproxy
  215.  
  216. #    The signature to use and the location of configuration files for
  217. #    signing packages with GNU gpg.
  218. #
  219. #%_gpg_name
  220. #%_gpg_path
  221.  
  222. #    The port and machine name of an HTTP proxy host.
  223. #
  224. #%_httpport
  225. #%_httpproxy
  226.  
  227. #    The PATH put into the environment before running %pre/%post et al.
  228. #
  229. %_install_script_path    /sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin
  230.  
  231. #    A colon separated list of desired locales to be installed;
  232. #    "all" means install all locale specific files.
  233. #    
  234. %_install_langs    all
  235.  
  236. #    The value of CLASSPATH in build scriptlets (iff configured).
  237. #    
  238. #%_javaclasspath    all
  239.  
  240. #    Import packaging conventions from jpackage.org (prefixed with _
  241. #    to avoid name collisions).
  242. #    
  243. %_javadir      %{_datadir}/java
  244. %_javadocdir   %{_datadir}/javadoc
  245.  
  246. #
  247. #    Deprecated.
  248. #
  249. #%_langpatt
  250.  
  251. #    A colon separated list of paths where files should *not* be installed.
  252. #    Usually, these are network file system mount points.
  253. #
  254. #%_netsharedpath
  255.  
  256. #    (experimental)
  257. #    The type of pattern match used on rpmdb iterator selectors:
  258. #    "default"    simple glob-like regex, periods will be escaped,
  259. #            splats will have period prepended, full "^...$" match
  260. #            required. Also, file path tags will use glob(7).
  261. #    "strcmp"    compare strings
  262. #    "regex"        regex(7) patterns using regcomp(3)/regexec(3)
  263. #    "glob"        glob(7) patterns using fnmatch(3)
  264. #
  265. %_query_selector_match    default
  266.  
  267. #    Configurable packager information, same as Packager: in a specfile.
  268. #
  269. #%packager
  270.  
  271. #    Compression type and level for source/binary package payloads.
  272. #        "w9.gzdio"    gzip level 9 (default).
  273. #        "w9.bzdio"    bzip2 level 9.
  274. #
  275. #%_source_payload    w9.gzdio
  276. #%_binary_payload    w9.gzdio
  277.  
  278. #    The signature to use and the location of configuration files for
  279. #    signing packages with PGP.
  280. #
  281. #%_pgp_name
  282. #%_pgp_path
  283.  
  284. #    Configurable vendor information, same as Vendor: in a specfile.
  285. #
  286. #%vendor
  287.  
  288. #==============================================================================
  289. # ---- Build configuration macros.
  290. #
  291. # Package version macro.
  292. #    The type of package to produce, for compatibility with legacy
  293. #    versions of rpm.
  294. #
  295. # This is an rpm version, e.g. 30005 means to produce packaging compatible
  296. # with rpm-3.0.5. At the moment, values < 30005 (i.e. compatibility with
  297. # version before rpm-3.0.5) are not supported. The only incompatible change
  298. # in rpm packaging since rpm-3.0.5 has been to replace a 3 with a 4 in the
  299. # rpmlead, so there's little need to use any value greater than 30005.
  300. #
  301. %_package_version    30005
  302.  
  303. #
  304. # Script gets packaged file list on input and buildroot as first parameter.
  305. # Returns list of unpackaged files, i.e. files in $RPM_BUILD_ROOT not packaged.
  306. #
  307. # Note: Disable (by commenting out) for legacy compatibility.
  308. %__check_files         /usr/lib/rpm/check-files %{buildroot}
  309.  
  310. #
  311. # Should unpackaged files in a build root terminate a build?
  312. #
  313. # Note: The default value should be 0 for legacy compatibility.
  314. %_unpackaged_files_terminate_build    1
  315.  
  316. #
  317. # Should missing %doc files in the build directory terminate a build?
  318. #
  319. # Note: The default value should be 0 for legacy compatibility.
  320. %_missing_doc_files_terminate_build    1
  321.  
  322. #
  323. # Use internal dependency generator rather than external helpers?
  324. %_use_internal_dependency_generator    1
  325.  
  326. #
  327. # Path to scripts to autogenerate package dependencies,
  328. #
  329. # Note: Used iff _use_internal_dependency_generator is zero.
  330. #%__find_provides    /usr/lib/rpm/rpmdeps --provides
  331. #%__find_requires    /usr/lib/rpm/rpmdeps --requires
  332. %__find_provides    /usr/lib/rpm/find-provides
  333. %__find_requires    /usr/lib/rpm/find-requires
  334. #%__find_conflicts    ???
  335. #%__find_obsoletes    ???
  336.  
  337. #
  338. # Path to scripts to autogenerate per-interpreter package dependencies,
  339. #
  340. # Note: Used iff _use_internal_dependency_generator is non-zero. The
  341. # helpers are also used by /usr/lib/rpm/rpmdeps {--provides|--requires).
  342. #%__perl_provides    /usr/lib/rpm/perldeps --provides
  343. #%__perl_requires    /usr/lib/rpm/perldeps --requires
  344. %__perl_provides    /usr/lib/rpm/perl.prov
  345. %__perl_requires    /usr/lib/rpm/perl.req
  346.  
  347. #
  348. # fixowner, fixgroup, and fixperms are run at the end of hardcoded setup
  349. # These macros are necessary only for legacy compatibility, and have moved
  350. # to per-platform macro configuration (i.e. /usr/lib/rpm/<arch>-<os>/macros)
  351. #
  352. # Note: These are no longer enabled by default.
  353. #%__id_u        %{__id} -u
  354. #%__chown_Rhf        %{__chown} -Rhf
  355. #%__chgrp_Rhf        %{__chgrp} -Rhf
  356. #%_fixowner        [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root
  357. #%_fixgroup        [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} root
  358. #%_fixperms        %{__chmod} -Rf a+rX,g-w,o-w
  359. #
  360.  
  361. #==============================================================================
  362. # ---- Database configuration macros.
  363. #    Macros used to configure Berkley db parameters.
  364. #
  365. # rpmdb macro configuration values are a colon (or white space) separated
  366. # list of tokens, with an optional '!' negation to explicitly disable bit
  367. # values, or a "=value" if a parameter. A per-tag value is used (e.g.
  368. # %_dbi_config_Packages) if defined, otherwise a per-rpmdb default
  369. # (e.g. %_dbi_config). The configuration is also conditioned on the
  370. # existence of an internal %{_rpmdb_rebuild} switch to permit changing
  371. # the configuration while rebuilding an rpmdb database.
  372. #
  373. # The rpmdb configuration tokens are in a popt table in rpmdb/dbconfig.c,
  374. # see that for the latest gory details. Note carefully that, unless you
  375. # are writing an rpm installer, you shouldn't have to touch *any* of these
  376. # parameters.
  377. #
  378. # Here's a short list of the tokens, with a guess of whether the option is
  379. # useful:
  380. #    (nothing)    currently used in rpm, known to work.
  381. #    "+++"        under development, will be supported in rpm eventually.
  382. #    "???"        I have no clue, you're mostly on your own.
  383. #
  384. # If you do find yourself inclined to fiddle, here's what I see (shrug):
  385. # 1) Only the value of mp_size has any serious impact on overall performance,
  386. #    and you will need ~256Kb to handle a typical machine install.
  387. # 2) Only the Packages hash, because of the size of the values (i.e. headers),
  388. #    will ever need tuning. Diddle the pagesize if you're interested, although
  389. #    I believe that you will find pagesize=512 "best".
  390. # 3) Adding nofsync increases speed, but risks total data loss. Fiddle shared
  391. #    and/or mp_size instead.
  392. # 4) btree is faster than hash, but would require some painful rpm release
  393. #    engineering to convert everbody's databases to btree, not gonna happen
  394. #    soon.
  395. #
  396. # See the db3-devel package, or http://www.sleepycat.com for Berkeley db-3.x
  397. # documentation.
  398. #
  399. #   token    works?    Berkeley db flag or value
  400. #==================================================
  401. #---------------------- DBENV->open parameters and tunable values:
  402. #   mmapsize=16Mb    DBENV->set_mp_mmapsize
  403. #   cachesize=1Mb    DBENV->set_cachesize, DB->set_cachesize
  404. #---------------------- DBENV->open and DB->open common bits:
  405. #   create        DB_CREATE
  406. #   thread    ???    DB_THREAD    (useless w/o posix mutexes on linux)
  407. #---------------------- DBENV->open bits:
  408. #   joinenv        DB_JOIN_ENV
  409. #   mpool        DB_INIT_MPOOL
  410. #   cdb        +++    DB_INIT_CDB
  411. #   txn        ???    DB_INIT_TXN
  412. #   log        ???    DB_INIT_LOG
  413. #   lock    ???    DB_INIT_LOCK
  414. #   recover    ???    DB_RECOVER
  415. #   recover_fatal ???    DB_RECOVER_FATAL
  416. #   use_environ    ???    DB_USE_ENVIRON
  417. #   use_environ_root ??? DB_USE_ENVIRON_ROOT
  418. #   private    +++    DB_PRIVATE
  419. #   lockdown    ???    DB_LOCKDOWN
  420. #   shared    +++    DB_SYSTEM_MEM
  421. #---------------------- DB->open parameters and tunable values:
  422. #   pagesize=512 +++    DB->set_pagesize
  423. #---------------------- DB->open bits:
  424. #   excl    ???    DB_EXCL
  425. #   nommap    ???    DB_NOMMAP
  426. #   rdonly        DB_RDONLY
  427. #---------------------- DB->open types:
  428. #   btree        DB_BTREE
  429. #   hash        DB_HASH
  430. #   recno    ???    DB_RECNO
  431. #   queue    ???    DB_QUEUE
  432. #   unknown    +++    DB_UNKNOWN
  433. #---------------------- DB->set_flags bits:
  434. #   bt_dup    +++    (btree only) DB_DUP
  435. #   bt_dupsort    +++    (btree only) DB_DUPSORT
  436. #   ht_dup    +++    (hash only) DB_DUP
  437. #   ht_dupsort    +++    (hash only) DB_DUPSORT
  438. #----------------------- rpmdb specific configuration:
  439. #   usedbenv        (always on) Use db3 environment?
  440. #   verify        (db3 only) Verify Packages db after RW close?
  441. #   lockdbfd        (always on for Packages) Use fcntl(2) locking ?
  442. #   nofsync        Disable fsync(2) call performed after db3 writes?
  443. #   temporary        Unlink file when closing.
  444. #
  445.  
  446. # XXX Use transactions and logs for rpmdb durability (no clue yet):
  447. #%__dbi_other            create joinenv mpool txn log \
  448. #                mp_mmapsize=8Mb mp_size=512Kb
  449.  
  450. # Use a CDB database model for concurrent access.
  451. # XXX Add "private" here for legacy interoperation transiting to glibc+nptl.
  452. %__dbi_cdb            create cdb mpool mp_mmapsize=16Mb mp_size=1Mb
  453.  
  454. %__dbi_other            %{?_tmppath:tmpdir=%{_tmppath}} %{?__dbi_cdb}
  455.  
  456. # Note: adding nofsync here speeds up --rebuilddb a lot.
  457. %__dbi_rebuild            nofsync !log !txn !cdb
  458. %__dbi_transient        %{__dbi_rebuild} temporary private
  459. %__dbi_perms            perms=0644
  460.  
  461. #
  462. #--- Hash database configuration
  463. %__dbi_htconfig    \
  464.   hash        \
  465.   %{__dbi_other}\
  466.   %{__dbi_perms}\
  467. %{nil}
  468.  
  469. %__dbi_htconfig_current        %{__dbi_htconfig}
  470. %__dbi_htconfig_rebuild        %{__dbi_htconfig} %{__dbi_rebuild}
  471.  
  472. %_dbi_htconfig        \
  473.   %{?_rpmdb_rebuild:%{__dbi_htconfig_rebuild}}\
  474.   %{!?_rpmdb_rebuild:%{__dbi_htconfig_current}}\
  475. %{nil}
  476.  
  477. #
  478. #--- Btree database configuration
  479. %__dbi_btconfig    \
  480.   btree        \
  481.   %{__dbi_other}\
  482.   %{__dbi_perms}\
  483. %{nil}
  484.  
  485. %__dbi_btconfig_current        %{__dbi_btconfig}
  486. %__dbi_btconfig_rebuild        %{__dbi_btconfig} %{__dbi_rebuild}
  487.  
  488. %_dbi_btconfig        \
  489.   %{?_rpmdb_rebuild:%{__dbi_btconfig_rebuild}}\
  490.   %{!?_rpmdb_rebuild:%{__dbi_btconfig_current}}\
  491. %{nil}
  492.  
  493. # The list of tags for which indices will be built.
  494. %_dbi_tags    Packages:Name:Basenames:Group:Requirename:Providename:Conflictname:Triggername:Dirnames:Requireversion:Provideversion:Installtid:Sigmd5:Sha1header:Filemd5s:Depends:Pubkeys
  495.  
  496. # "Packages" should have shared/exclusive fcntl(2) lock using "lockdbfd".
  497. %_dbi_config_Packages        %{_dbi_htconfig} lockdbfd
  498.  
  499. # "Depends" is a per-transaction cache of known dependency resolutions.
  500. %_dbi_config_Depends        %{_dbi_htconfig} temporary private
  501.  
  502. %_dbi_config_Dirnames        %{_dbi_btconfig}
  503. %_dbi_config_Requireversion    %{_dbi_btconfig}
  504. %_dbi_config_Provideversion    %{_dbi_btconfig}
  505. %_dbi_config_Installtid        %{_dbi_btconfig}
  506. %_dbi_config_Removetid        %{_dbi_btconfig}
  507.  
  508. # XXX legacy configuration.
  509. # Choose db interface:
  510. #    3    native db3 interface.
  511. #
  512. # There are two macros so that --rebuilddb can convert db1 -> db3.
  513. #
  514. %_dbapi            3
  515. %_dbapi_rebuild        3
  516.  
  517. %_dbi_config    %{_dbi_htconfig}
  518.  
  519. #==============================================================================
  520. # ---- GPG/PGP/PGP5 signature macros.
  521. #    Macro(s) to hold the arguments passed to GPG/PGP for package
  522. #    signing and verification.
  523. #
  524. %__gpg_check_password_cmd    %{__gpg} \
  525.     gpg --batch --no-verbose --passphrase-fd 3 -u "%{_gpg_name}" -so -
  526. %__pgp_check_password_cmd    %{__pgp} \
  527.     pgp +batchmode=on +verbose=0 "%{_pgp_name}" -sf
  528. %__pgp5_check_password_cmd    %{__pgp} \
  529.     pgps +batchmode=on +verbose=0 +armor=off "%{_pgp_name}" -f
  530.  
  531. %__gpg_sign_cmd            %{__gpg} \
  532.     gpg --batch --no-verbose --no-armor --passphrase-fd 3 --no-secmem-warning \
  533.     -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}
  534. %__pgp_sign_cmd            %{__pgp} \
  535.     pgp +batchmode=on +verbose=0 +armor=off \
  536.     "+myname=%{_pgp_name}" -sb %{__plaintext_filename} %{__signature_filename}
  537. %__pgp5_sign_cmd        %{__pgp} \
  538.     pgps +batchmode=on +verbose=0 +armor=off \
  539.     "+myname=%{_pgp_name}" -b %{__plaintext_filename} -o %{__signature_filename}
  540.  
  541. # XXX rpm-4.1 verifies signatures using beecrypt.
  542. #%__gpg_verify_cmd        %{__gpg} \
  543. #    gpg --batch --no-verbose --verify --no-secmem-warning \
  544. #    %{__signature_filename} %{__plaintext_filename}
  545. #%__pgp_verify_cmd        %{__pgp} \
  546. #    pgp +batchmode=on +verbose=0 \
  547. #    %{__signature_filename} %{__plaintext_filename}
  548. #%__pgp5_verify_cmd        %{__pgp} \
  549. #    pgpv +batchmode=on +verbose=0 \
  550. #    +OutputInformationFD=1 +OutputWarningFD=1 \
  551. #    -o %{__signature_filename} %{__plaintext_filename}
  552.  
  553. #
  554. # XXX rpm-4.1 verifies prelinked libraries using a prelink undo helper.
  555. #    Normally this macro is defined in /etc/rpm/macros.prelink, installed
  556. #    with the prelink package. If the macro is undefined, then prelinked
  557. #    shared libraries contents are MD5 digest verified (as usual), rather
  558. #    than MD5 verifying the output of the prelink undo helper.
  559. #
  560. #    Note: The 2nd token is used as argv[0] and "library" is a
  561. #    placeholder that will be deleted and replaced with the appropriate
  562. #    library file path.
  563. #%__prelink_undo_cmd     /usr/sbin/prelink prelink -y library
  564.  
  565. #==============================================================================
  566. # ---- Transaction macros.
  567. #    Macro(s) used to parameterize transactions.
  568. #
  569. #    The output binary package file name template used when building
  570. #    binary packages.
  571. #
  572. # XXX    Note: escaped %% for use in headerSprintf()
  573. %_build_name_fmt    %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
  574.  
  575. #    The default transaction color. This value is a set of bits to
  576. #    determine file and dependency affinity for this arch.
  577. #        0    uncolored (i.e. use only arch as install hint)
  578. #        1    Elf32 permitted
  579. #        2    Elf64 permitted
  580. %_transaction_color    0
  581.  
  582. #    A default autorelocation path prefixed to file paths of packages
  583. #    that have an incompatible arch. This is used on ia64 to prefix
  584. #    /emul/ia32 to i386 file paths, and nowhere else (yet).
  585. #
  586. # XXX    Note: escaped %% for use in headerSprintf()
  587. %_autorelocate_path    %{nil}
  588.  
  589. #    The path to the dependency universe database. The default value
  590. #    is the rpmdb-redhat location. The macro is usually defined in
  591. #    /etc/rpm/macros.solve, installed with the rpmdb-redhat package.
  592. #%_solve_dbpath    /usr/lib/rpmdb/%{_arch}-%{_vendor}-%{_os}/redhat
  593.  
  594. #    The path to the dependency universe packages. This should
  595. #    be a path to the packages contained in the solve database.
  596. #%_solve_pkgsdir    /mnt/redhat/test/latest-i386/RedHat/RPMS/
  597.  
  598. #    The output binary package file name template used when suggesting
  599. #    binary packages that solve a dependency. The macro is usually defined
  600. #    in /etc/rpm/macros.solve, installed with the rpmdb-redhat package.
  601. #
  602. # XXX    Note: escaped %% for use in headerSprintf()
  603. #%_solve_name_fmt    %{?_solve_pkgsdir}%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
  604.  
  605. #    The output binary package file name template used when repackaging
  606. #    erased packages.
  607. #
  608. # XXX    Note: escaped %% for use in headerSprintf()
  609. %_repackage_name_fmt    %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
  610.  
  611. #    The directory in which erased packages will be saved when using
  612. #    the --repackage option.
  613. %_repackage_dir        /var/spool/repackage
  614.  
  615. #    A path (i.e. URL) prefix that is pre-pended to %{_repackage_dir}.
  616. %_repackage_root    %{nil}
  617.  
  618. #    If non-zero, all erasures will be automagically repackaged.
  619. %_repackage_all_erasures    0
  620.  
  621. #    Verify digest/signature flags for various rpm modes:
  622. #         1    --nohdrchk    if set, don't check rpmdb headers
  623. #
  624. #    The checking overhead is ~11ms per header for digests/signatures;
  625. #    each header from the database is checked only when first encountered
  626. #    for each database open.
  627. #
  628. #    Note: the %_vsflags_erase applies to --upgrade/--freshen modes as
  629. #    well as --erase.
  630. #
  631. %__vsflags        0
  632. %_vsflags_build        %{__vsflags}
  633. %_vsflags_erase        %{__vsflags}
  634. %_vsflags_install    %{__vsflags}
  635. %_vsflags_query        %{__vsflags}
  636. %_vsflags_rebuilddb    %{__vsflags}
  637. %_vsflags_up2date    %{__vsflags}
  638. %_vsflags_verify    %{__vsflags}
  639.  
  640. #    Relations between package names that cause dependency loops
  641. #    with legacy packages that cannot be fixed. Relations are
  642. #    specified as
  643. #        p>q
  644. #    where package p has a Requires: on something that package q Provides:
  645. #
  646. # XXX    Note: that there cannot be any whitespace within the string "p>q",
  647. #    and that both p and q are package names (i.e. no version/release).
  648. #
  649. #%_dependency_whiteout_5_2        \
  650. #    pam>pamconfig
  651. #%_dependency_whiteout_6_1        \
  652. #    pilot-link-devel>pilot-link
  653. #%_dependency_whiteout_6_2        \
  654. #    egcs-c++>libstdc++
  655. %_dependency_whiteout_7_0        \
  656.     pango-gtkbeta-devel>pango-gtkbeta\
  657.     XFree86>Mesa            \
  658.     compat-glibc>db2        \
  659.     compat-glibc>db1        \
  660.     pam>initscripts            \
  661.     initscripts>sysklogd
  662. %_dependency_whiteout_7_1        \
  663.     arts>kdelibs-sound
  664. %_dependency_whiteout_7_2        \
  665.     libgnomeprint15>gnome-print    \
  666.     nautilus>nautilus-mozilla    \
  667.     tcl>postgresql-tcl
  668. #%_dependency_whiteout_8_0        \
  669. #    perl>perl-Parse-RecDescent    \
  670. #    XFree86-libs>XFree86-Mesa-libGL    \
  671. #    perl>perl-Filter        \
  672. #    perl>mrtg            \
  673. #    perl>mod_perl            \
  674. #    mysql>perl-DBD-MySQL        \
  675. #    ghostscript>gimp-print        \
  676. #    arts>kde2-compat        \
  677. #    perl-Date-Calc>perl-Bit-Vector    \
  678. #    glibc-debug>glibc-devel
  679.  
  680. %_dependency_whiteout            \
  681.     libtermcap>bash            \
  682.     modutils>vixie-cron        \
  683.     ypbind>yp-tools            \
  684.     ghostscript-fonts>ghostscript    \
  685.     %{?_dependency_whiteout_8_0}    \
  686.     %{?_dependency_whiteout_7_2}    \
  687.     %{?_dependency_whiteout_7_1}    \
  688.     %{?_dependency_whiteout_7_0}    \
  689.     %{?_dependency_whiteout_6_2}    \
  690.     %{?_dependency_whiteout_6_1}    \
  691.     %{?_dependency_whiteout_5_2}    \
  692.     %{nil}
  693.  
  694. #
  695. # Default headerSprintf() output format string for rpm -qa
  696. #
  697. # XXX    Note: escaped %% for use in headerSprintf()
  698. %_query_all_fmt        %%{name}-%%{version}-%%{release}
  699.  
  700. #==============================================================================
  701. # ---- Cache configuration macros.
  702. #    Macro(s) used to configure the universe of headers used to
  703. #    solve dependencies using rpmcache(8).
  704. #
  705. #    Note: These values are specific to my machine, and most certainly
  706. #    are incorrect for any non-redhat.com machine. The macros are
  707. #    included here only to document the macro names and usage.
  708. %_bhpath        file://localhost/mnt/dist
  709. %_bhcoll        @(7.3|7.2|7.1|7.1sbe|7.1k|7.0|7.01j|7.0j|7.0sbe|7.0tc|6.2|6.2ha|6.2ee|6.1|6.0|5.2|5.1|5.0)
  710. %_bhN           @(SRPMS|i386|alpha|sparc|s390|ia64)
  711. %_bhVR          RedHat
  712. %_bhA           RPMS
  713.  
  714. #    The cache database directory.
  715. %_cache_dbpath        /var/spool/up2date/cache
  716.  
  717. #==============================================================================
  718. # ---- per-platform macros.
  719. #    Macros that are specific to an individual platform. The values here
  720. #    will be used if the per-platform macro file does not exist..
  721. #
  722. %_arch            i386
  723. %_build_arch        i386
  724. %_vendor        rpm
  725. %_os            linux
  726. %_gnu            -gnu
  727. %_target_platform    %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}
  728.  
  729. #
  730. # Define a generic value for optflags. Normally overridden by per-target macros.
  731. %optflags        -O2
  732.  
  733. #
  734. # Define per-arch and per-os defaults. Normally overridden by per-target macros.
  735. %__arch_install_post    %{nil}
  736. %__os_install_post    %{___build_post}
  737.  
  738. #==============================================================================
  739. # ---- Scriptlet template templates.
  740. #    Global defaults used for building scriptlet templates.
  741. #
  742.  
  743. %___build_shell        %{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh}
  744. %___build_args        -e
  745. %___build_cmd        %{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args}
  746. %___build_pre    \
  747.   RPM_SOURCE_DIR=\"%{u2p:%{_sourcedir}}\"\
  748.   RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\
  749.   RPM_OPT_FLAGS=\"%{optflags}\"\
  750.   RPM_ARCH=\"%{_arch}\"\
  751.   RPM_OS=\"%{_os}\"\
  752.   export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS\
  753.   RPM_DOC_DIR=\"%{_docdir}\"\
  754.   export RPM_DOC_DIR\
  755.   RPM_PACKAGE_NAME=\"%{name}\"\
  756.   RPM_PACKAGE_VERSION=\"%{version}\"\
  757.   RPM_PACKAGE_RELEASE=\"%{release}\"\
  758.   export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE\
  759.   %{?buildroot:RPM_BUILD_ROOT=\"%{u2p:%{buildroot}}\"\
  760.   export RPM_BUILD_ROOT}\
  761.   %{?_javaclasspath:CLASSPATH=\"%{_javaclasspath}\"\
  762.   export CLASSPATH}\
  763.   \
  764.   %{verbose:set -x}%{!verbose:exec > /dev/null}\
  765.   umask 022\
  766.   cd %{u2p:%{_builddir}}\
  767.  
  768.  
  769. #%___build_body        %{nil}
  770. %___build_post        exit 0
  771.  
  772. %___build_template    #!%{___build_shell}\
  773. %{___build_pre}\
  774. %{nil}
  775.  
  776. #%{___build_body}\
  777. #%{___build_post}\
  778. #%{nil}
  779.  
  780. #==============================================================================
  781. # ---- Scriptlet templates.
  782. #    Macro(s) that expand to a command and script that is executed.
  783. #    CAVEAT: All macro expansions must fit in a BUFSIZ (8192 byte) buffer.
  784. #
  785. %__spec_prep_shell    %{___build_shell}
  786. %__spec_prep_args    %{___build_args}
  787. %__spec_prep_cmd    %{___build_cmd}
  788. %__spec_prep_pre    %{___build_pre}
  789. %__spec_prep_body    %{___build_body}
  790. %__spec_prep_post    %{___build_post}
  791. %__spec_prep_template    #!%{__spec_prep_shell}\
  792. %{__spec_prep_pre}\
  793. %{nil}
  794.  
  795. #%{__spec_prep_body}\
  796. #%{__spec_prep_post}\
  797. #%{nil}
  798.  
  799. %__spec_build_shell    %{___build_shell}
  800. %__spec_build_args    %{___build_args}
  801. %__spec_build_cmd    %{___build_cmd}
  802. %__spec_build_pre    %{___build_pre}
  803. %__spec_build_body    %{___build_body}
  804. %__spec_build_post    %{___build_post}
  805. %__spec_build_template    #!%{__spec_build_shell}\
  806. %{__spec_build_pre}\
  807. %{nil}
  808.  
  809. #%{__spec_build_body}\
  810. #%{__spec_build_post}\
  811. #%{nil}
  812.  
  813. %__spec_install_shell    %{___build_shell}
  814. %__spec_install_args    %{___build_args}
  815. %__spec_install_cmd    %{___build_cmd}
  816. %__spec_install_pre    %{___build_pre}
  817. %__spec_install_body    %{___build_body}
  818. %__spec_install_post\
  819. %{?__debug_package:%{__debug_install_post}}\
  820. %{__arch_install_post}\
  821. %{__os_install_post}\
  822. %{nil}
  823. %__spec_install_template    #!%{__spec_install_shell}\
  824. %{__spec_install_pre}\
  825. %{nil}
  826.  
  827. #%{__spec_install_body}\
  828. #%{__spec_install_post}\
  829. #%{nil}
  830.  
  831. %__spec_check_shell    %{___build_shell}
  832. %__spec_check_args    %{___build_args}
  833. %__spec_check_cmd    %{___build_cmd}
  834. %__spec_check_pre    %{___build_pre}
  835. %__spec_check_body    %{___build_body}
  836. %__spec_check_post    %{___build_post}
  837. %__spec_check_template    #!%{__spec_check_shell}\
  838. %{__spec_check_pre}\
  839. %{nil}
  840.  
  841. #%{__spec_check_body}\
  842. #%{__spec_check_post}\
  843. #%{nil}
  844.  
  845. #%__spec_autodep_shell    %{___build_shell}
  846. #%__spec_autodep_args    %{___build_args}
  847. #%__spec_autodep_cmd    %{___build_cmd}
  848. #%__spec_autodep_pre    %{___build_pre}
  849. #%__spec_autodep_body    %{___build_body}
  850. #%__spec_autodep_post    %{___build_post}
  851. #%__spec_autodep_template    #!%{__spec_autodep_shell}\
  852. #%{__spec_autodep_pre}\
  853. #%{nil}
  854.  
  855. #%{__spec_autodep_body}\
  856. #%{__spec_autodep_post}\
  857. #%{nil}
  858.  
  859. %__spec_clean_shell    %{___build_shell}
  860. %__spec_clean_args    %{___build_args}
  861. %__spec_clean_cmd    %{___build_cmd}
  862. %__spec_clean_pre    %{___build_pre}
  863. %__spec_clean_body    %{___build_body}
  864. %__spec_clean_post    %{___build_post}
  865. %__spec_clean_template    #!%{__spec_clean_shell}\
  866. %{__spec_clean_pre}\
  867. %{nil}
  868.  
  869. #%{__spec_clean_body}\
  870. #%{__spec_clean_post}\
  871. #%{nil}
  872.  
  873. %__spec_rmbuild_shell    %{___build_shell}
  874. %__spec_rmbuild_args    %{___build_args}
  875. %__spec_rmbuild_cmd    %{___build_cmd}
  876. %__spec_rmbuild_pre    %{___build_pre}
  877. %__spec_rmbuild_body    %{___build_body}
  878. %__spec_rmbuild_post    %{___build_post}
  879. %__spec_rmbuild_template    #!%{__spec_rmbuild_shell}\
  880. %{__spec_rmbuild_pre}\
  881. %{nil}
  882.  
  883. #%{__spec_rmbuild_body}\
  884. #%{__spec_rmbuild_post}\
  885. #%{nil}
  886.  
  887. # XXX We don't expand pre/post install scriptlets (yet).
  888. #%__spec_pre_pre        %{nil}
  889. #%__spec_pre_post        %{nil}
  890. #%__spec_post_pre        %{nil}
  891. #%__spec_post_post        %{nil}
  892. #%__spec_preun_pre        %{nil}
  893. #%__spec_preun_post        %{nil}
  894. #%__spec_postun_pre        %{nil}
  895. #%__spec_postun_post        %{nil}
  896. #%__spec_triggerpostun_pre    %{nil}
  897. #%__spec_triggerpostun_post    %{nil}
  898. #%__spec_triggerun_pre        %{nil}
  899. #%__spec_triggerun_post        %{nil}
  900. #%__spec_triggerin_pre        %{nil}
  901. #%__spec_triggerin_post        %{nil}
  902.  
  903. #==============================================================================
  904. # ---- configure macros.
  905. #    Macro(s) slavishly copied from autoconf's config.status.
  906. #
  907. %_prefix        /usr
  908. %_exec_prefix        %{_prefix}
  909. %_bindir        %{_exec_prefix}/bin
  910. %_sbindir        %{_exec_prefix}/sbin
  911. %_libexecdir        %{_exec_prefix}/libexec
  912. %_datadir        %{_prefix}/share
  913. %_sysconfdir        %{_prefix}/etc
  914. %_sharedstatedir    %{_prefix}/com
  915. %_localstatedir        %{_prefix}/var
  916. %_lib            lib
  917. %_libdir        %{_exec_prefix}/%{_lib}
  918. %_includedir        %{_prefix}/include
  919. %_oldincludedir        /usr/include
  920. %_infodir        %{_prefix}/info
  921. %_mandir        %{_prefix}/man
  922.  
  923. #==============================================================================
  924. # ---- config.guess platform macros.
  925. #    Macro(s) similar to the tokens used by configure.
  926. #
  927. %_build            %{_host}
  928. %_build_alias        %{_host_alias}
  929. %_build_cpu        %{_host_cpu}
  930. %_build_vendor        %{_host_vendor}
  931. %_build_os        %{_host_os}
  932. %_host            i386-rpm-linux-gnu
  933. %_host_alias        i386-rpm-linux%{nil}
  934. %_host_cpu        i386
  935. %_host_vendor        rpm
  936. %_host_os        linux-gnu
  937. %_target        %{_host}
  938. %_target_alias        %{_host_alias}
  939. %_target_cpu        %{_host_cpu}
  940. %_target_vendor        %{_host_vendor}
  941. %_target_os        %{_host_os}
  942.  
  943. #==============================================================================
  944. # ---- specfile macros.
  945. #    Macro(s) here can be used reliably for reproducible builds.
  946. #    (Note: Above is the goal, below are the macros under development)
  947. #
  948. # The configure macro does the following:
  949. #    optionally change to a subdirectory (not implemented).
  950. #    attempt to update config.guess and config.sub.
  951. #    run configure with correct prefix, platform, and CFLAGS.
  952. #    optionally restore current directory (not implemented).
  953. # The configure macro should be invoked as %configure (rather than %{configure})
  954. # because the rest of the arguments will be expanded using %*.
  955. #
  956. # This is the version of %configure used through rpm-3.0.4.
  957. #%configure    \
  958. #  %{?__libtoolize:[ -f configure.in ] && %{__libtoolize} --copy --force} \
  959. #  CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix}
  960. #
  961. #------------------------------------------------------------------------------
  962. # This is an improved version of %configure (from PLD team).
  963. %configure \
  964.   CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
  965.   CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
  966.   FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
  967.   ./configure --host=%{_host} --build=%{_build} \\\
  968.     --target=%{_target_platform} \\\
  969.     --program-prefix=%{?_program_prefix} \\\
  970.      --prefix=%{_prefix} \\\
  971.     --exec-prefix=%{_exec_prefix} \\\
  972.     --bindir=%{_bindir} \\\
  973.     --sbindir=%{_sbindir} \\\
  974.     --sysconfdir=%{_sysconfdir} \\\
  975.     --datadir=%{_datadir} \\\
  976.     --includedir=%{_includedir} \\\
  977.     --libdir=%{_libdir} \\\
  978.     --libexecdir=%{_libexecdir} \\\
  979.     --localstatedir=%{_localstatedir} \\\
  980.     --sharedstatedir=%{_sharedstatedir} \\\
  981.     --mandir=%{_mandir} \\\
  982.     --infodir=%{_infodir}
  983.  
  984. #------------------------------------------------------------------------------
  985. # The make install analogue of %configure:
  986. %makeinstall \
  987.   make \\\
  988.     prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\
  989.     exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\
  990.     bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\
  991.     sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\
  992.     sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\
  993.     datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\
  994.     includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\
  995.     libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\
  996.     libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\
  997.     localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\
  998.     sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\
  999.     mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\
  1000.     infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\
  1001.   install
  1002.  
  1003. #------------------------------------------------------------------------------
  1004. # The GNUconfigure macro does the following:
  1005. #       update config.guess and config.sub.
  1006. #       regenerate all autoconf/automake files
  1007. #       optionally change to a directory (make the directory if requested).
  1008. #       run configure with correct prefix, platform, and CFLAGS.
  1009. #       optionally restore current directory.
  1010. #
  1011. # Based on autogen.sh from GNOME and orginal GNUconfigure
  1012. #
  1013. %GNUconfigure(MCs:)      \
  1014.   CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS; \
  1015.   LDFLAGS="${LDFLAGS:-%{-s:-s}}"  ; export LDFLAGS; \
  1016.   %{-C:_mydir="`pwd`"; %{-M: %{__mkdir} -p %{-C*};} cd %{-C*}} \
  1017.   dirs="`find ${_mydir} -name configure.in -print`"; export dirs; \
  1018.     for coin in `echo ${dirs}` \
  1019. do \
  1020.   dr=`dirname ${coin}`; \
  1021. if test -f ${dr}/NO-AUTO-GEN; then \
  1022.  : \
  1023. else \
  1024.      macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < ${coin}`; \
  1025.     ( cd ${dr}; \
  1026.       aclocalinclude="${ACLOCAL_FLAGS}"; \
  1027.       for k in ${macrodirs}; do \
  1028.         if test -d ${k}; then \
  1029.           aclocalinclude="${aclocalinclude} -I ${k}"; \
  1030.         ##else \
  1031.         ##  echo "**Warning**: No such directory \`${k}'.  Ignored." \
  1032.         fi \
  1033.       done \
  1034.       if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then \
  1035.         if grep "sed.*POTFILES" configure.in >/dev/null; then \
  1036.           : do nothing -- we still have an old unmodified configure.in \
  1037.         else \
  1038.           test -r ${dr}/aclocal.m4 || touch ${dr}/aclocal.m4; \
  1039.           echo "no" | gettextize --force --copy; \
  1040.           test -r ${dr}/aclocal.m4 && %{__chmod} u+w ${dr}/aclocal.m4; \
  1041.         fi \
  1042.       fi \
  1043.       if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then \
  1044.         %{__libtoolize} --force --copy; \
  1045.       fi \
  1046.       aclocal ${aclocalinclude}; \
  1047.       if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then \
  1048.         %{__autoheader}; \
  1049.       fi \
  1050.       echo "Running automake --gnu ${am_opt} ..."; \
  1051.       %{__automake} --add-missing --gnu ${am_opt}; \
  1052.       %{__autoconf}; \
  1053.     ); \
  1054.   fi \
  1055. done \
  1056.   %{-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} %* ; \
  1057.   %{-C:cd ${_mydir}; unset _mydir}
  1058.  
  1059. #------------------------------------------------------------------------------
  1060. # Useful perl macros (from Artur Frysiak <wiget@t17.ds.pwr.wroc.pl>)
  1061. #
  1062. # For example, these can be used as (from ImageMagick.spec from PLD site)
  1063. #    [...]
  1064. #    BuildPrereq: perl
  1065. #    [...]
  1066. #    %package perl
  1067. #    Summary: libraries and modules for access to ImageMagick from perl
  1068. #    Group: Development/Languages/Perl
  1069. #    Requires: %{name} = %{version}
  1070. #    %requires_eq    perl
  1071. #    [...]
  1072. #    %install
  1073. #    rm -fr $RPM_BUILD_ROOT
  1074. #    install -d $RPM_BUILD_ROOT/%{perl_sitearch}
  1075. #    [...]
  1076. #    %files perl
  1077. #    %defattr(644,root,root,755)
  1078. #    %{perl_sitearch}/Image
  1079. #    %dir %{perl_sitearch}/auto/Image
  1080. #
  1081. %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")
  1082. %perl_sitearch    %(eval "`perl -V:installsitearch`"; echo $installsitearch)
  1083. %perl_archlib    %(eval "`perl -V:installarchlib`"; echo $installarchlib)
  1084.  
  1085. #------------------------------------------------------------------------------
  1086. # arch macro for all Intel i?86 compatibile processors
  1087. #  (Note: This macro (and it's analogues) will probably be obsoleted when
  1088. #   rpm can use regular expressions against target platforms in macro
  1089. #   conditionals.
  1090. #
  1091. %ix86   i386 i486 i586 i686 athlon
  1092.  
  1093. #------------------------------------------------------------------------
  1094. # Use in %install to generate locale specific file lists. For example,
  1095. #
  1096. # %install
  1097. # ...
  1098. # %find_lang %{name}
  1099. # ...
  1100. # %files -f %{name}.lang
  1101. #
  1102. %find_lang    /usr/lib/rpm/find-lang.sh %{buildroot}
  1103.  
  1104. # \endverbatim
  1105. #*/
  1106.