1f6abd8e0430a4504ec2ad9f75bc3d20da8cead6
[platform/upstream/rpm.git] / platform.in
1 # Per-platform rpm configuration file.
2
3 #==============================================================================
4 # ---- per-platform macros.
5 #
6 %_arch                  @RPMRC_ARCH@
7 %_vendor                @RPMCANONVENDOR@
8 %_os                    @RPMCANONOS@
9 %_gnu                   @RPMRC_GNU@
10 %_target_platform       %{_target_cpu}-%{_vendor}-%{_target_os}
11 %optflags               @RPMRC_OPTFLAGS@
12
13 #==============================================================================
14 # ---- configure macros.
15 #
16 %_prefix                @prefix@
17 %_exec_prefix           @exec_prefix@
18 %_bindir                @bindir@
19 %_sbindir               @sbindir@
20 %_libexecdir            @libexecdir@
21 %_datadir               @datadir@
22 %_sysconfdir            @sysconfdir@
23 %_sharedstatedir        @sharedstatedir@
24 %_localstatedir         @localstatedir@
25 %_lib                   @LIB@
26 %_libdir                @LIBDIR@
27 %_includedir            @includedir@
28 %_oldincludedir         @oldincludedir@
29 %_infodir               @infodir@
30 %_mandir                @mandir@
31 %_initrddir             %{_sysconfdir}/rc.d/init.d
32
33 %_defaultdocdir         @DEFAULTDOCDIR@
34
35 #==============================================================================
36 # ---- configure and makeinstall.
37 #
38 %configure \
39   CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
40   CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
41   FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
42   %{?__libtoolize:[ -f configure.in ] && %{__libtoolize} --copy --force} ; \
43   ./configure %{_target_platform} \\\
44         --prefix=%{_prefix} \\\
45         --exec-prefix=%{_exec_prefix} \\\
46         --bindir=%{_bindir} \\\
47         --sbindir=%{_sbindir} \\\
48         --sysconfdir=%{_sysconfdir} \\\
49         --datadir=%{_datadir} \\\
50         --includedir=%{_includedir} \\\
51         --libdir=%{_libdir} \\\
52         --libexecdir=%{_libexecdir} \\\
53         --localstatedir=%{_localstatedir} \\\
54         --sharedstatedir=%{_sharedstatedir} \\\
55         --mandir=%{_mandir} \\\
56         --infodir=%{_infodir}
57
58 %makeinstall \
59   make \\\
60         prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\
61         exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\
62         bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\
63         sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\
64         sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\
65         datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\
66         includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\
67         libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\
68         libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\
69         localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\
70         sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\
71         mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\
72         infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\
73   install
74
75 %_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
76         && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
77         [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
78
79 @MULTILIBSTART@
80 #---------------------------------------------------------------------
81 #       Multilibs
82 %_multilibno            @MULTILIBNO@
83 %_multilibpatt          (/%{_lib}|/usr/%{_lib}(|/gconv)|/usr/local/%{_lib}|/usr/X11R6/%{_lib}|/opt/%{_lib})/[^/]*\\.([oa]|la|so[0-9.]*)$
84 @MULTILIBEND@
85
86 #==============================================================================
87 # ---- Build policy macros.
88 #
89 #---------------------------------------------------------------------
90 #       Expanded at end of %install scriptlet.
91 #
92
93 %__arch_install_post   @ARCH_INSTALL_POST@
94
95 %__os_install_post    \
96     @prefix@/lib/rpm/brp-compress \
97     @prefix@/lib/rpm/brp-strip \
98     @prefix@/lib/rpm/brp-strip-comment-note \
99 %{nil}
100
101 %__spec_install_post\
102     %{__arch_install_post}\
103     %{__os_install_post}\
104 %{nil}
105
106 @redhat@#---------------------------------------------------------------------
107 @redhat@#       Expanded at end of %prep
108 @redhat@#
109 @redhat@%__id_u         @__ID_U@
110 @redhat@%__chown_Rhf    @__CHOWN_RHF@
111 @redhat@%__chgrp_Rhf    @__CHGRP_RHF@
112 @redhat@%_fixowner      [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root
113 @redhat@%_fixgroup      [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} @ROOT_GROUP@
114 @redhat@%_fixperms      %{__chmod} -Rf @FIXPERMS@
115
116 @mandrake@#---------------------------------------------------------------------
117 @mandrake@#     Mandrake vendor specific macros
118 @mandrake@# XXX Add a support e-mail address here, please.
119 @mandrake@#
120 @mandrake@#
121 @mandrake@# XXX These values, particularly vendor, need to be regularized, please.
122 @mandrake@%_vendor              MandrakeSoft
123 @mandrake@%_real_vendor         mandrake
124 @mandrake@%_target_platform     %{_target_cpu}-%{_real_vendor}-%{_target_os}
125 @mandrake@
126 @mandrake@# XXX I'll make these the default linux values soon as I can.
127 @mandrake@%_libexecdir          %{_libdir}
128 @mandrake@%_localstatedir               %{_var}/lib
129 @mandrake@
130 @mandrake@# XXX A copy of brp-mandrake, please. I'd suggest break down by
131 @mandrake@#     functionality rather than vendor <shrug>.
132 @mandrake@%__os_install_post    \
133 @mandrake@    /usr/lib/rpm/brp-mandrake \
134 @mandrake@%{nil}
135 @mandrake@
136 @mandrake@# make
137 @mandrake@%_make_bin make
138 @mandrake@%make if [ -z "$NPROCS" -a -f /proc/stat ]; then NPROCS=`egrep -c ^cpu[0-9]+ /proc/stat || :`; fi \
139 @mandrake@if [ -z "$NPROCS" -o "$NPROCS" -le "0" ]; then \
140 @mandrake@  NPROCS=1 \
141 @mandrake@fi \
142 @mandrake@%{_make_bin} -j$NPROCS
143 @mandrake@
144 @mandrake@# Menu directories
145 @mandrake@%_menudir %{_libdir}/menu
146 @mandrake@%_iconsdir %{_datadir}/icons
147 @mandrake@%_miconsdir %{_datadir}/icons/mini
148 @mandrake@%_liconsdir %{_datadir}/icons/large
149 @mandrake@
150 @mandrake@# Update Menu
151 @mandrake@%_update_menus_bin %{_bindir}/update-menus
152 @mandrake@%update_menus if [ -x %{_update_menus_bin} ]; then %{_update_menus_bin} || true ; fi
153 @mandrake@
154 @mandrake@# Clean Menu
155 @mandrake@%clean_menus if [ "$1" = "0" -a -x %{_update_menus_bin} ]; then %{_update_menus_bin} || true ; fi
156 @mandrake@
157 @mandrake@# Update Window Managers session.
158 @mandrake@%_fndsession_bin %{_sbindir}/fndSession
159 @mandrake@%make_session if [ -x %{_fndsession_bin} ]; then %{_fndsession_bin} || true ; fi
160 @mandrake@
161 @mandrake@#     Where install-info is located
162 @mandrake@%__install_info               /sbin/install-info
163 @mandrake@
164 @mandrake@#     Macros to install info-files.
165 @mandrake@%_install_info()      %{__install_info} %{_infodir}/%{1}%{_extension} --dir=%{_infodir}/dir\;
166 @mandrake@
167 @mandrake@#     Macros to remove info-files. (keep the "alone on its line ';'")
168 @mandrake@%_remove_install_info() if [ "$1" = "0" ]; then %{__install_info} \\\
169 @mandrake@ %{_infodir}/%{1}%{_extension} --dir=%{_infodir}/dir --remove ; fi\
170 @mandrake@%{nil}
171 @mandrake@
172 @mandrake@# Games macros
173 @mandrake@%_gamesdir    games
174 @mandrake@%_gamesbindir   %{_prefix}/%{_gamesdir}
175 @mandrake@%_gamesdatadir  %{_datadir}/%{_gamesdir}