1 # Per-platform rpm configuration file.
3 #==============================================================================
4 # ---- per-platform macros.
7 %_vendor @RPMCANONVENDOR@
10 %_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}
11 %optflags @RPMRC_OPTFLAGS@
13 #==============================================================================
14 # ---- configure macros.
17 %_exec_prefix @exec_prefix@
20 %_libexecdir @libexecdir@
22 %_sysconfdir @sysconfdir@
23 %_sharedstatedir @sharedstatedir@
24 %_localstatedir @localstatedir@
27 %_includedir @includedir@
28 %_oldincludedir @oldincludedir@
31 %_initrddir %{_sysconfdir}/rc.d/init.d
33 %_defaultdocdir @DEFAULTDOCDIR@
35 #==============================================================================
36 # ---- configure and makeinstall.
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} \\\
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} \\\
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}")
80 #---------------------------------------------------------------------
82 %_multilibno @MULTILIBNO@
83 %_multilibpatt (/%{_lib}|/usr/%{_lib}(|/gconv)|/usr/local/%{_lib}|/usr/X11R6/%{_lib}|/opt/%{_lib})/[^/]*\\.([oa]|la|so[0-9.]*)$
86 #==============================================================================
87 # ---- Build policy macros.
89 #---------------------------------------------------------------------
90 # Expanded at end of %install scriptlet.
93 %__arch_install_post @ARCH_INSTALL_POST@
96 @prefix@/lib/rpm/brp-compress \
97 @prefix@/lib/rpm/brp-strip \
98 @prefix@/lib/rpm/brp-strip-comment-note \
101 %__spec_install_post\
102 %{__arch_install_post}\
103 %{__os_install_post}\
106 @redhat@#---------------------------------------------------------------------
107 @redhat@# Expanded at end of %prep
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@
116 @mandrake@#---------------------------------------------------------------------
117 @mandrake@# Mandrake vendor specific macros
118 @mandrake@# XXX Add a support e-mail address here, please.
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}
126 @mandrake@# XXX I'll make these the default linux values soon as I can.
127 @mandrake@%_libexecdir %{_libdir}
128 @mandrake@%_localstatedir %{_var}/lib
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 \
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 \
142 @mandrake@%{_make_bin} -j$NPROCS
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
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
154 @mandrake@# Clean Menu
155 @mandrake@%clean_menus if [ "$1" = "0" -a -x %{_update_menus_bin} ]; then %{_update_menus_bin} || true ; fi
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
161 @mandrake@# Where install-info is located
162 @mandrake@%__install_info /sbin/install-info
164 @mandrake@# Macros to install info-files.
165 @mandrake@%_install_info() %{__install_info} %{_infodir}/%{1}%{_extension} --dir=%{_infodir}/dir\;
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\
172 @mandrake@# Games macros
173 @mandrake@%_gamesdir games
174 @mandrake@%_gamesbindir %{_prefix}/%{_gamesdir}
175 @mandrake@%_gamesdatadir %{_datadir}/%{_gamesdir}