%vendor contains Red Hat
[tools/librpm-tizen.git] / macros.in
1 # $Id: macros.in,v 1.18 1999/03/27 21:40:56 jbj Exp $
2 #==============================================================================
3 # Macro naming conventions (preliminary):
4 #
5 #       Macros that begin with an underscore are "local" in the sense that
6 #       they (if used) will not be exported in rpm headers. Some macros
7 #       that don't start with an underscore (but look like they should)
8 #       are compatible with macros generated by rpm-2.5.x and will be made
9 #       more consistent in a future release.
10 #
11
12 #==============================================================================
13 # ---- filesystem macros.
14 #
15 %_usr                   @prefix@
16 %_usrsrc                %{_usr}/src
17 %_var                   @varprefix@
18
19 #==============================================================================
20 # ---- path macros
21 #
22 %__bzip2                 %(which bzip2)
23 %__cat                   %(which cat)
24 %__chgrp                 %(which chgrp)
25 %__chmod                 %(which chmod)
26 %__chown                 %(which chown)
27 %__gzip                  %(which gzip)
28 %__install               %(which install)
29 %__libtoolize            %(which libtoolize)
30 %__make                  %(which make)
31 %__mkdir                 %(which mkdir)
32 %__patch                 %(which patch)
33 %__ranlib                %(which ranlib)
34 %__rm                    %(which rm)
35 %__strip                 %(which strip)
36 %__tar                   %(which tar)
37
38 #==============================================================================
39 # ---- Required rpmrc macros.
40 #       Macros that used to be initialized as a side effect of rpmrc parsing.
41 #       These are the default values that can be overridden by other
42 #       (e.g. per-platform, per-system, per-packager) macro files.
43 #
44 %_builddir              %{_topdir}/BUILD
45 %_buildshell            /bin/sh
46 %_bzip2bin              @BZIP2BIN@
47 %_dbpath                %{_var}/lib/rpm
48 %_defaultdocdir         %{_usr}/doc
49 #
50 # XXX fixowner, fixgroup, and fixperms are run at the end of hardcoded setup
51 #%_fixowner             chown -R root
52 #%_fixgroup             chgrp -R @ROOT_GROUP@
53 %_fixperms              chmod -R @FIXPERMS@
54 #
55 %_gzipbin               @GZIPBIN@
56 %_instchangelog         5
57 %_pgpbin                @PGPBIN@
58 %_rpmdir                %{_topdir}/RPMS
59 #
60 # XXX Note escaped %% for use in headerSprintf
61 %_rpmfilename           %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
62 %_signature             none
63 %_sourcedir             %{_topdir}/SOURCES
64 %_specdir               %{_topdir}/SPECS
65 %_srcrpmdir             %{_topdir}/SRPMS
66 %_tmppath               %{_var}/tmp
67 %_topdir                %{_usrsrc}/redhat
68 #
69 #==============================================================================
70 # ---- Optional rpmrc macros.
71 #       Macros that used to be initialized as a side effect of rpmrc and/or
72 #       spec file parsing but were not set in the distributed configuration 
73 #       /usr/lib/rpm/rpmrc file.
74 #
75 #%buildroot
76 #%distribution
77 #%_excludedocs
78 #%_ftpport
79 #%_ftpproxy
80 #%_gpg_name
81 #%_gpg_path
82 #%_httpport
83 #%_httpproxy
84 #%_langpatt
85 #%_netsharedpath
86 #%packager
87 #%_pgp_name
88 #%_pgp_path
89 #%_provides
90 #%_timecheck
91 #%vendor
92
93 #==============================================================================
94 # ---- per-platform macros.
95 #       Macros that are specific to an individual platform. The values here
96 #       will be used if the per-platform macro file does not exist..
97 #
98 %_arch                  @RPMCANONARCH@
99 %_vendor                @RPMCANONVENDOR@
100 %_os                    @RPMCANONOS@
101 %_target_platform       %{_target_cpu}-%{_vendor}-%{_target_os}
102 #
103 # XXX use the rpmrc instantiated macro for now
104 #%optflags              -O2
105
106 #==============================================================================
107 # ---- script environment macros.
108 #       Macro(s) that establish the environment for running a script.
109 #
110 %_preScriptEnvironment  \
111         RPM_SOURCE_DIR=\"%{_sourcedir}\"\
112         RPM_BUILD_DIR=\"%{_builddir}\"\
113         RPM_OPT_FLAGS=\"%{optflags}\"\
114         RPM_ARCH=\"%{_target_cpu}\"\
115         RPM_OS=\"%{_target_os}\"\
116         export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS\
117         RPM_DOC_DIR=\"%{_docdir}\"\
118         export RPM_DOC_DIR\
119         RPM_PACKAGE_NAME=\"%{name}\"\
120         RPM_PACKAGE_VERSION=\"%{version}\"\
121         RPM_PACKAGE_RELEASE=\"%{release}\"\
122         export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE\
123         %{?buildroot:RPM_BUILD_ROOT=\"%{buildroot}\"\
124         export RPM_BUILD_ROOT\
125         }
126
127 #==============================================================================
128 # ---- configure macros.
129 #       Macro(s) similar to those used by configure.
130 #
131 %_prefix                @prefix@
132 %_build                 %{_host}
133 %_build_alias           %{_host_alias}
134 %_build_cpu             %{_host_cpu}
135 %_build_vendor          %{_host_vendor}
136 %_build_os              %{_host_os}
137 %_host                  @host@
138 %_host_alias            @host_alias@
139 %_host_cpu              @host_cpu@
140 %_host_vendor           @host_vendor@
141 %_host_os               @host_os@
142 %_target                %{_host}
143 %_target_alias          %{_host_alias}
144 %_target_cpu            %{_host_cpu}
145 %_target_vendor         %{_host_vendor}
146 %_target_os             %{_host_os}
147
148 #==============================================================================
149 # ---- specfile macros.
150 #       Macro(s) here can be used reliably for reproducible builds.
151 #       (Note: Above is the goal, below are the macros under development)
152 #
153 # The configure macro does the following:
154 #       optionally change to a subdirectory (not implemented).
155 #       attempt to update config.guess and config.sub.
156 #       run configure with correct prefix, platform, and CFLAGS.
157 #       optionally restore current directory (not implemented).
158 # The configure macro should be invoked as %configure (rather than %{configure})
159 # because the rest of the arguments will be expanded using %*. Another
160 # gotcha is that arguments, if present, should be on the same line as the
161 # %configure.
162 #
163 %configure      \
164   %{?__libtoolize:[ -f configure.in ] && %{__libtoolize} --copy --force} \
165   CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix}