1 #==============================================================================
2 # Macro naming conventions (preliminary):
4 # Macros that begin with an underscore are "local" in the sense that
5 # they (if used) will not be exported in rpm headers.
8 #==============================================================================
9 # ---- filesystem macros.
15 #==============================================================================
18 %__bzip2 %(which bzip2)
20 %__chgrp %(which chgrp)
21 %__chmod %(which chmod)
22 %__chown %(which chown)
24 %__install %(which install)
26 %__mkdir %(which mkdir)
27 %__patch %(which patch)
28 %__ranlib %(which ranlib)
30 %__strip %(which strip)
33 #==============================================================================
35 # Macros that are initialized as a side effect of rpmrc parsing.
36 # These are the default values that will be overridden by any
37 # explicit values found in /usr/lib/rpm/rpmrc or /etc/rpmrc.
40 %_builddir %{_topdir}/BUILD
43 %_dbpath %{_var}/lib/rpm
44 %_defaultdocdir %{_prefix}/doc
47 %_rpmdir %{_topdir}/RPMS
48 %_rpmfilename %{ARCH}/%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm
49 %_sourcedir %{_topdir}/SOURCES
50 %_specdir %{_topdir}/SPECS
51 %_srcrpmdir %{_topdir}/SRPMS
53 %_topdir %{_usrsrc}/redhat
56 #==============================================================================
57 # ---- script environment macros.
58 # Macro(s) that establish the environment for running a script.
60 %_preScriptEnvironment \
61 RPM_SOURCE_DIR=\"%{_sourcedir}\"\
62 RPM_BUILD_DIR=\"%{_builddir}\"\
63 RPM_OPT_FLAGS=\"%{optflags}\"\
66 export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS\
67 RPM_DOC_DIR=\"%{_docdir}\"\
69 RPM_PACKAGE_NAME=\"%{name}\"\
70 RPM_PACKAGE_VERSION=\"%{version}\"\
71 RPM_PACKAGE_RELEASE=\"%{release}\"\
72 export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE\
73 %{?buildroot:RPM_BUILD_ROOT=\"%{buildroot}\"\
74 export RPM_BUILD_ROOT\
77 #==============================================================================