macros
Go to the documentation of this file.
#
%_rpmgi_pattern_regex() ^.+/%1-[^-]+-[^-]+\\.[^.]+\\.rpm$
#
# UUIDv3/UUIDv5 namespace URI macros. The complete canonical path is
# %_uuid_uri %{?_uuid_auth}/%{?_uuid_path}/Tagname/Tagvalue
%_uuid_auth http://rpm5.org/
%_uuid_path /package
#==============================================================================
# ---- EVRD... dependency tuple comparison macros.
#
# STEP 1: Match the string and capture regex parts
# 1 2 3 4
# X ":" X "-"X ":"X
%evr_tuple_match ^(?:([^:-]+):)?([^:-]+)(?:-([^:-]+))?(?::([^:-]+))?$
# STEP 2: Assemble <E,V,R,D> tuple from regex parts
# <E,V,R,D> case 1: case 2: case 3: case 4: case 5: case 6:
# X:X-X:X X:X-X X:X X: X-X X
# %evr_tuple_select 1234 123_ 12__ 1___ _23_ _2__
%evr_tuple_select 123_
# STEP 3: Configure the comparison order of the <E,V,R,D> tuple elements
%evr_tuple_order EVR
# data validation patterns for identifier tags
%pattern_Name ^[A-Za-z0-9][A-Za-z0-9+._-]*$
%pattern_Epoch ^[0-9]+$
%pattern_Version ^[A-Za-z0-9+._]+$
%pattern_Release ^[A-Za-z0-9+._]+$
%pattern_Disttag ^[A-Za-z0-9]+$
%pattern_Repotag ^[A-Za-z0-9]+$
%pattern_Distepoch ^[A-Za-z0-9.]+$
#%pattern_Url
#%pattern_Cvsid
#%pattern_Group
#%pattern_Summary
#%pattern_Distribution
#%pattern_Vendor
#%pattern_License
#%pattern_Packager
#%pattern_Buildroot
#%pattern_Keywords
#%pattern_Variants
#%pattern_Prefixes
#%pattern_Docdir
#%pattern_Xmajor
#%pattern_Xminor
#%pattern_Autoreqprov
#%pattern_Autoreq
#%pattern_Autoprov
#%pattern_Source
#%pattern_Patch
#%pattern_Icon
#%pattern_Nosource
#%pattern_Nopatch
#%pattern_Buildprereq
#%pattern_Buildprovides
#%pattern_Buildrequires
#%pattern_Buildconflicts
#%pattern_Buildobsoletes
#%pattern_Buildsuggests
#%pattern_Buildenhances
#%pattern_Prereq
#%pattern_Provideflags
#%pattern_Requireflags
#%pattern_Conflictflags
#%pattern_Obsoleteflags
#%pattern_Suggestsflags
#%pattern_Enhancesflags
#%pattern_Buildplatforms
#%pattern_Excludearch
#%pattern_Exclusivearch
#%pattern_Excludeos
#%pattern_Exclusiveos
#%pattern_Buildarchs
#==============================================================================
# ---- Run-time probe dependency macros.
#
%_rpmds_filter_name archfilter
#
%_rpmds_cpuinfo_path /proc/cpuinfo
#
%_rpmds_sysinfo_path %{_etcrpm}/sysinfo
#
%_rpmds_ldconfig_cmd /sbin/ldconfig -p
%_rpmds_ldconfig_cache /etc/ld.so.cache
# A colon-separated list of directories which should match the rld's
# (runtime loader) list of directories it searches for shared objects.
# Only used on platforms that don't have a configurable loader search
# path via ldconfig, crle, or something similar.
#%_rpmds_rld_search_path /lib:/usr/lib
#
# Full path and arguments to Solaris' command to list what directories
# the runtime loader searches. Needs to include `-64' for LP64 Solaris
# systems.
#%_rpmds_crle_cmd /usr/bin/crle
#
%_rpmds_getconf_path /
#
%_rpmds_perldeps_cmd %{__find} %{_libdir}/perl5 | %{_rpmhome}/perl.prov
#
%_varrun /var/run
#==============================================================================
# ---- Cache configuration macros.
# Macro(s) used to configure the universe of headers used to
# solve dependencies using rpmcache(8).
#
# Note: These values were specific to my machine, and most certainly
# are incorrect for any other machine. The macros are
# included here only to document the macro names and usage.
#%_bhpath file://localhost/mnt/dist
#%_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)
#%_bhN @(SRPMS|i386|alpha|sparc|s390|ia64)
#%_bhVR @(RedHat|Fedora)
#%_bhA RPMS
#
# A configuration to build an rpmdb from yum package hierarchy
%_bhpath file:
%_bhcoll @(updates)
%_bhN @(packages)
%_bhVR %{nil}
%_bhA %{nil}
# The cache database directory.
%_cache_dbpath /var/cache/yum/rpmdb
#==============================================================================
# ---- per-platform macros.
# Macros that are specific to an individual platform. The values here
# will be used if the per-platform macro file does not exist..
#
%_arch i386
%_build_arch i386
%_vendor portbld
%_os freebsd
%_gnu %{nil}
%_host_platform %{_host_cpu}-%{_host_vendor}-%{_host_os}%{?_gnu}
%_build_platform %{_build_cpu}-%{_build_vendor}-%{_build_os}%{?_gnu}
%_target_platform %{_target_cpu}-%{_target_vendor}-%{_target_os}%{?_gnu}
#
# Define a generic value for optflags. Normally overridden by per-target macros.
%optflags -O2
#
# Define per-arch and per-os defaults. Normally overridden by per-target macros.
%__arch_install_post %{nil}
%__os_install_post %{___build_post}
#==============================================================================
# ---- Scriptlet template templates.
# Global defaults used for building scriptlet templates.
#
%___build_shell %{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh}
%___build_args -e
%___build_cmd %{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args}
%___build_pre \
RPM_SOURCE_DIR=\"%{u2p:%{_sourcedir}}\"\
RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\
RPM_OPT_FLAGS=\"%{optflags}\"\
RPM_ARCH=\"%{_arch}\"\
RPM_OS=\"%{_os}\"\
export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS\
RPM_DOC_DIR=\"%{_docdir}\"\
export RPM_DOC_DIR\
RPM_PACKAGE_NAME=\"%{name}\"\
RPM_PACKAGE_VERSION=\"%{version}\"\
RPM_PACKAGE_RELEASE=\"%{release}\"\
export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE\
%{?buildroot:RPM_BUILD_ROOT=\"%{u2p:%{buildroot}}\"\
export RPM_BUILD_ROOT}\
%{?_javaclasspath:CLASSPATH=\"%{_javaclasspath}\"\
export CLASSPATH}\
unset PERL_MM_OPT || :\
LC_ALL=C\
export LC_ALL\
LANG=C\
export LANG\
unset DISPLAY || :\
unset LINGUAS || :\
unset LANGUAGE || :\
unset LC_MESSAGES || :\
\
%{verbose:set -x}%{!verbose:exec > /dev/null}\
umask 022\
cd "%{u2p:%{_builddir}}"\
#%___build_body %{nil}
%___build_post exit 0
%___build_template #!%{___build_shell}\
%{___build_pre}\
%{nil}
#%{___build_body}\
#%{___build_post}\
#%{nil}
#==============================================================================
# ---- Scriptlet templates.
# Macro(s) that expand to a command and script that is executed.
# CAVEAT: All macro expansions must fit in a BUFSIZ (8192 byte) buffer.
#
%__spec_prep_shell %{___build_shell}
%__spec_prep_args %{___build_args}
%__spec_prep_cmd %{___build_cmd}
%__spec_prep_pre %{___build_pre}
%__spec_prep_body %{___build_body}
%__spec_prep_post %{___build_post}
%__spec_prep_template #!%{__spec_prep_shell}\
%{__spec_prep_pre}\
%{nil}
#%{__spec_prep_body}\
#%{__spec_prep_post}\
#%{nil}
%__spec_build_shell %{___build_shell}
%__spec_build_args %{___build_args}
%__spec_build_cmd %{___build_cmd}
%__spec_build_pre %{___build_pre}
%__spec_build_body %{___build_body}
%__spec_build_post %{___build_post}
%__spec_build_template #!%{__spec_build_shell}\
%{__spec_build_pre}\
%{nil}
#%{__spec_build_body}\
#%{__spec_build_post}\
#%{nil}
%__spec_install_shell %{___build_shell}
%__spec_install_args %{___build_args}
%__spec_install_cmd %{___build_cmd}
%__spec_install_pre %{___build_pre}\
%{?buildroot:%{__rm} -rf '%{buildroot}'; %{__mkdir_p} '%{buildroot}'}
%__spec_install_body %{___build_body}
%__spec_install_post\
%{?__debug_package:%{__debug_install_post}}\
%{__arch_install_post}\
%{__os_install_post}\
%{nil}
%__spec_install_template #!%{__spec_install_shell}\
%{__spec_install_pre}\
%{nil}
#%{__spec_install_body}\
#%{__spec_install_post}\
#%{nil}
%__spec_check_shell %{___build_shell}
%__spec_check_args %{___build_args}
%__spec_check_cmd %{___build_cmd}
%__spec_check_pre %{___build_pre}
%__spec_check_body %{___build_body}
%__spec_check_post %{___build_post}
%__spec_check_template #!%{__spec_check_shell}\
%{__spec_check_pre}\
%{nil}
#%{__spec_check_body}\
#%{__spec_check_post}\
#%{nil}
#%__spec_autodep_shell %{___build_shell}
#%__spec_autodep_args %{___build_args}
#%__spec_autodep_cmd %{___build_cmd}
#%__spec_autodep_pre %{___build_pre}
#%__spec_autodep_body %{___build_body}
#%__spec_autodep_post %{___build_post}
#%__spec_autodep_template #!%{__spec_autodep_shell}\
#%{__spec_autodep_pre}\
#%{nil}
#%{__spec_autodep_body}\
#%{__spec_autodep_post}\
#%{nil}
%__spec_clean_shell %{___build_shell}
%__spec_clean_args %{___build_args}
%__spec_clean_cmd %{___build_cmd}
%__spec_clean_pre %{___build_pre}
%__spec_clean_body %{?buildroot:%{__rm} -rf '%{buildroot}'}\
%{nil}
%__spec_clean_post %{nil}
%__spec_clean_template #!%{__spec_clean_cmd}\
%{__spec_clean_pre}\
%{nil}
#%{__spec_clean_body}\
#%{__spec_clean_post}\
#%{nil}
%__spec_track_shell %{___build_shell}
%__spec_track_args %{___build_args}
%__spec_track_cmd %{___build_cmd}
%__spec_track_pre %{__vcheck} %{verbose:--verbose}%{!verbose:--noverbose} -f - << GO_SYSIN_DD
%__spec_track_body %{___build_body}
%__spec_track_post GO_SYSIN_DD\
%{nil}
%__spec_track_template #!%{__spec_track_shell}\
%{__spec_track_pre}\
%{nil}
%__spec_sanitycheck_shell %{___build_shell}
%__spec_sanitycheck_args %{___build_args}
%__spec_sanitycheck_cmd %{___build_cmd}
%__spec_sanitycheck_pre %{___build_pre}
%__spec_sanitycheck_body %{___build_body}
%__spec_sanitycheck_post %{___build_post}
%__spec_sanitycheck_template #!%{__spec_sanitycheck_shell}\
%{__spec_sanitycheck_pre}\
%{nil}
%__spec_rmbuild_shell %{___build_shell}
%__spec_rmbuild_args %{___build_args}
%__spec_rmbuild_cmd %{___build_cmd}
%__spec_rmbuild_pre %{___build_pre}
%__spec_rmbuild_body %{___build_body}
%__spec_rmbuild_post %{___build_post}
%__spec_rmbuild_template #!%{__spec_rmbuild_shell}\
%{__spec_rmbuild_pre}\
%{nil}
#%{__spec_rmbuild_body}\
#%{__spec_rmbuild_post}\
#%{nil}
# XXX We don't expand pre/post install scriptlets (yet).
#%__spec_pre_pre %{nil}
#%__spec_pre_post %{nil}
#%__spec_post_pre %{nil}
#%__spec_post_post %{nil}
#%__spec_preun_pre %{nil}
#%__spec_preun_post %{nil}
#%__spec_postun_pre %{nil}
#%__spec_postun_post %{nil}
#%__spec_triggerpostun_pre %{nil}
#%__spec_triggerpostun_post %{nil}
#%__spec_triggerun_pre %{nil}
#%__spec_triggerun_post %{nil}
#%__spec_triggerin_pre %{nil}
#%__spec_triggerin_post %{nil}
#==============================================================================
# ---- configure macros.
# Macro(s) slavishly copied from autoconf's config.status.
#
%_prefix /usr/local
%_exec_prefix %{_prefix}
%_bindir %{_exec_prefix}/bin
%_sbindir %{_exec_prefix}/sbin
%_libexecdir %{_exec_prefix}/libexec
%_datadir %{_prefix}/share
%_sysconfdir %{_prefix}/etc
%_sharedstatedir %{_prefix}/com
%_localstatedir %{_prefix}/var
%_lib lib
%_libdir %{_exec_prefix}/%{_lib}
%_includedir %{_prefix}/include
%_oldincludedir /usr/include
%_infodir %{_prefix}/info
%_mandir %{_prefix}/man
%_localedir %{_datadir}/locale
%_initrddir %{_sysconfdir}/rc.d/init.d
#---------------------------------------------------------------------
# Multilibs
%_multilibpatt (/%{_lib}|/usr/%{_lib}(|/gconv)|/usr/local/%{_lib}|/usr/X11R6/%{_lib}|/opt/%{_lib})/[^/]*\\.([oa]|la|so[0-9.]*)$
#==============================================================================
# ---- config.guess platform macros.
# Macro(s) similar to the tokens used by configure.
#
%_build %{_host}
%_build_alias %{_host_alias}
%_build_cpu %{_host_cpu}
%_build_vendor %{_host_vendor}
%_build_os %{_host_os}
%_host i386-portbld-freebsd8.3
%_host_alias %{nil}
%_host_cpu i386
%_host_vendor portbld
%_host_os freebsd8.3
%_target %{_host}
%_target_alias %{_host_alias}
%_target_cpu %{_host_cpu}
%_target_vendor %{_host_vendor}
%_target_os %{_host_os}
#==============================================================================
# ---- specfile macros.
# Macro(s) here can be used reliably for reproducible builds.
# (Note: Above is the goal, below are the macros under development)
#
# The configure macro does the following:
# optionally change to a subdirectory (not implemented).
# attempt to update config.guess and config.sub.
# run configure with correct prefix, platform, and CFLAGS.
# optionally restore current directory (not implemented).
# The configure macro should be invoked as %configure (rather than %{configure})
# because the rest of the arguments will be expanded using %*.
#
# This is the version of %configure used through rpm-3.0.4.
#%configure \
# %{?__libtoolize:[ -f configure.in ] && %{__libtoolize} --copy --force} \
# CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix}
#
#------------------------------------------------------------------------------
# This is an improved version of %configure (from PLD team).
%configure \
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
./configure --host=%{_host} --build=%{_build} \\\
--target=%{_target_platform} \\\
--program-prefix=%{?_program_prefix} \\\
--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}
#------------------------------------------------------------------------------
# The make install analogue of %configure:
%makeinstall \
make \\\
prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\
exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\
bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\
sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\
sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\
datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\
includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\
libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\
libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\
localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\
sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\
mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\
infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\
install
#------------------------------------------------------------------------------
# The GNUconfigure macro does the following:
# update config.guess and config.sub.
# regenerate all autoconf/automake files
# optionally change to a directory (make the directory if requested).
# run configure with correct prefix, platform, and CFLAGS.
# optionally restore current directory.
#
# Based on autogen.sh from GNOME and orginal GNUconfigure
#
%GNUconfigure(MCs:) \
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS; \
LDFLAGS="${LDFLAGS:-%{-s:-s}}" ; export LDFLAGS; \
%{-C:_mydir="`pwd`"; %{-M: %{__mkdir} -p "%{-C*}";} cd "%{-C*}"} \
dirs="`find ${_mydir} -name 'configure.[ai][cn]' -print`"; export dirs; \
for coin in `echo ${dirs}` \
do \
dr=`dirname ${coin}`; \
if test -f ${dr}/NO-AUTO-GEN; then \
: \
else \
macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < ${coin}`; \
( cd "${dr}"; \
aclocalinclude="${ACLOCAL_FLAGS}"; \
for k in ${macrodirs}; do \
if test -d ${k}; then \
aclocalinclude="${aclocalinclude} -I ${k}"; \
##else \
## echo "**Warning**: No such directory \`${k}'. Ignored." \
fi \
done \
if grep "^AM_GNU_GETTEXT" configure.[ai][cn] >/dev/null; then \
if grep "sed.*POTFILES" configure.[ai][cn] >/dev/null; then \
: do nothing -- we still have an old unmodified configure.[ai][cn] \
else \
test -r ${dr}/aclocal.m4 || touch ${dr}/aclocal.m4; \
echo "no" | gettextize --force --copy; \
test -r ${dr}/aclocal.m4 && %{__chmod} u+w ${dr}/aclocal.m4; \
fi \
fi \
if grep "^AM_PROG_LIBTOOL" configure.[ai][cn] >/dev/null; then \
%{__libtoolize} --force --copy; \
fi \
aclocal ${aclocalinclude}; \
if grep "^AM_CONFIG_HEADER" configure.[ai][cn] >/dev/null; then \
%{__autoheader}; \
fi \
echo "Running automake --gnu ${am_opt} ..."; \
%{__automake} --add-missing --gnu ${am_opt}; \
%{__autoconf}; \
); \
fi \
done \
%{-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} %* ; \
%{-C:cd "${_mydir}"; unset _mydir}
%patches %{lua: for i, p in ipairs(patches) do print(p.." ") end}
%sources %{lua: for i, s in ipairs(sources) do print(s.." ") end}
#------------------------------------------------------------------------------
# argument to pass to 'make' to run one job per cpu in parallel on smp systems.
%_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
&& RPM_BUILD_NCPUS="`/usr/bin/getconf NPROCESSORS_ONLN`"; \\\
[ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
#------------------------------------------------------------------------------
# arch macro for all Intel i?86 compatibile processors
# (Note: This macro (and it's analogues) will probably be obsoleted when
# rpm can use regular expressions against target platforms in macro
# conditionals.
#
%ix86 i386 i486 i586 i686 pentium3 pentium4 athlon
# same thing for arm
%arm arm armv3 armv3l armv3b armv4 armv4l armv4b armv5 armv5l armv5b armv5te armv5tel armv5teb xscale armv6 armv6l
# same for alpha
%alpha alpha alphaev56 alphaev6 alphaev67
# and sparc
%sparc sun4 sun4m sun4c sun4d sun4u sparcv9b sparcv9v2 %{sparcx}
# add alternative sparc architectures macro (bugzilla #455972 patch)
%sparcx sparc sparcv8 sparcv9 sparcv9v sparc64 sparc64v
# also for mips
%mips mips mips2 mips3 mips4 octeon
%mipsel mipsel mips2el mips3el mips4el loongson2e loongson2f octeonel
%mipsx %mips %mipsel mips64 mips64el
#------------------------------------------------------------------------
# Use in %install to generate locale specific file lists. For example,
#
# %install
# ...
# %find_lang %{name}
# ...
# %files -f %{name}.lang
#
%find_lang %{_rpmhome}/find-lang.sh %{buildroot}
#------------------------------------------------------------------------
# lua macros
#
#%rpm_license_check %{expand:%%define rpm_license_check %{lua:\
#f = io.open("/dev/tty", "w")\
#if f then\
# f:write ("\\nJust checking to see who is using rpm-5.2.1.\\nThe RPM Package Manager license is LGPL, as always.\\nRelax ...\\n")\
# f:close()\
#end\
#}1}%{rpm_license_check}
#------------------------------------------------------------------------
# perl(...) configuration
#
# Path to scripts to autogenerate perl package dependencies,
#
# Note: Used iff _use_internal_dependency_generator is non-zero. The
# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
#%__perl_provides %{_rpmhome}/perldeps.pl --provides
#%__perl_requires %{_rpmhome}/perldeps.pl --requires
%__perl_provides %{_rpmhome}/perl.prov
%__perl_requires %{_rpmhome}/perl.req
# Useful macros for building *.rpm perl packages.
# (from Artur Frysiak <wiget@t17.ds.pwr.wroc.pl>)
#
# For example, these can be used as (from ImageMagick.spec from PLD site)
# [...]
# BuildPrereq: perl
# [...]
# %package perl
# Summary: libraries and modules for access to ImageMagick from perl
# Group: Development/Languages/Perl
# Requires: %{name} = %{version}
# %requires_eq perl
# [...]
# %install
# rm -fr $RPM_BUILD_ROOT
# install -d $RPM_BUILD_ROOT/%{perl_sitearch}
# [...]
# %files perl
# %defattr(644,root,root,755)
# %{perl_sitearch}/Image
# %dir %{perl_sitearch}/auto/Image
#
%requires_eq() %(echo '%*' | LC_ALL="C" xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")
%perl_sitearch %(eval "`%{__perl} -V:installsitearch`"; echo $installsitearch)
%perl_sitelib %(eval "`%{__perl} -V:installsitelib`"; echo $installsitelib)
%perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch)
%perl_vendorlib %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib)
%perl_archlib %(eval "`%{__perl} -V:installarchlib`"; echo $installarchlib)
%perl_privlib %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib)
%perl_version %(eval "`%{__perl} -V:version`"; echo $version)
#------------------------------------------------------------------------
# python(...) configuration.
#
# Path to scripts to autogenerate python package dependencies,
#
# Note: Used iff _use_internal_dependency_generator is non-zero. The
# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
%__python_provides %{_rpmhome}/pythondeps.sh --provides
%__python_requires %{_rpmhome}/pythondeps.sh --requires
# Useful macros for building *.rpm python packages (for python > 1.6).
#
%python_sitearch %(%{__python} -c "import os; from distutils.sysconfig import get_python_lib; lib=get_python_lib(1); print os.path.islink(lib) and os.path.abspath(os.path.join(os.path.dirname(lib),os.readlink(lib))) or lib")
%python_sitelib %(%{__python} -c "import os; from distutils.sysconfig import get_python_lib; lib=get_python_lib(); print os.path.islink(lib) and os.path.abspath(os.path.join(os.path.dirname(lib),os.readlink(lib))) or lib")
%python_version %(%{__python} -c "import sys; print(sys.version[0:3])")
%py_compile(O) \
find %1 -name '*.pyc' -name '*.pyo' -exec rm -f {} \\; \
%{__python} %{?O:-O} -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
%py_requires(d) \
%define maxver %(%{__python} -c "import sys; a,b=sys.version_info[:2]; print '%%d.%%d'%%(a,b+1)" 2>/dev/null || echo PYTHON-NOT-FOUND) \
BuildRequires: python %{-d:python-devel} \
PreReq: python >= %{python_version}, python < %{maxver}
#------------------------------------------------------------------------
# php(...) configuration.
#
# Path to scripts to autogenerate php package dependencies,
#
# Note: Used iff _use_internal_dependency_generator is non-zero. The
# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
#%__php_provides %{_rpmhome}/phpdeps.sh --provides
#%__php_requires %{_rpmhome}/phpdeps.sh --requires
#%__php_provides %{_rpmhome}/php.prov
#%__php_requires %{_rpmhome}/php.req
#------------------------------------------------------------------------
# java(...) configuration.
#
# Path to scripts to autogenerate java package dependencies,
#
# Note: Used iff _use_internal_dependency_generator is non-zero. The
# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
%__java_provides %{_rpmhome}/javadeps.sh --provides
%__java_requires %{_rpmhome}/javadeps.sh --requires
#------------------------------------------------------------------------
# libtool(...) configuration.
#
# Path to scripts to autogenerate libtool package dependencies,
#
# Note: Used iff _use_internal_dependency_generator is non-zero. The
# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
%__libtool_provides %{_rpmhome}/libtooldeps.sh --provides %{buildroot} %{name}
%__libtool_requires %{_rpmhome}/libtooldeps.sh --requires %{buildroot} %{name}
#------------------------------------------------------------------------
# pkgconfig(...) configuration.
#
# Path to scripts to autogenerate pkgconfig package dependencies,
#
# Note: Used iff _use_internal_dependency_generator is non-zero. The
# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
%__pkgconfig_provides %{_rpmhome}/pkgconfigdeps.sh --provides
%__pkgconfig_requires %{_rpmhome}/pkgconfigdeps.sh --requires
#------------------------------------------------------------------------
# mono(...) configuration.
#
# Path to scripts to autogenerate mono package dependencies,
#
# Note: Used iff _use_internal_dependency_generator is non-zero. The
# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
%__mono_provides %{_rpmhome}/mono-find-provides
%__mono_requires %{_rpmhome}/mono-find-requires
#------------------------------------------------------------------------
# executable(...) configuration.
#
# Path to scripts to autogenerate executable(foo) script dependencies,
#
# Note: Used iff _use_internal_dependency_generator is non-zero. The
# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
#%__executable_provides %{_rpmhome}/executabledeps.sh --provides
#%__executable_requires %{_rpmhome}/executabledeps.sh --requires
%__scriptlet_requires %{__bash} --rpm-requires
# \endverbatim
#*/