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 %_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
36 && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
37 [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
40 #---------------------------------------------------------------------
42 %_multilibno @MULTILIBNO@
43 %_multilibpatt (/%{_lib}|/usr/%{_lib}(|/gconv)|/usr/local/%{_lib}|/usr/X11R6/%{_lib}|/opt/%{_lib})/[^/]*\\.([oa]|la|so[0-9.]*)$
46 #==============================================================================
47 # ---- Build policy macros.
49 #---------------------------------------------------------------------
50 # Expanded at end of %install scriptlet.
53 %__arch_install_post @ARCH_INSTALL_POST@
56 @RPMCONFIGDIR@/brp-compress \
57 @RPMCONFIGDIR@/brp-strip \
58 @RPMCONFIGDIR@/brp-strip-comment-note \
62 %{?__debug_package:%{__debug_install_post}}\
63 %{__arch_install_post}\
67 @redhat@#---------------------------------------------------------------------
68 @redhat@# Expanded at end of %prep
70 @redhat@%__id_u @__ID_U@
71 @redhat@%__chown_Rhf @__CHOWN_RHF@
72 @redhat@%__chgrp_Rhf @__CHGRP_RHF@
73 @redhat@%_fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root
74 @redhat@%_fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} @ROOT_GROUP@
75 @redhat@%_fixperms %{__chmod} -Rf @FIXPERMS@
76 @redhat@#---------------------------------------------------------------------
77 @redhat@# Always use %defattr(-,root,root) in %files (added in rpm-4.0.4)
79 @redhat@#%files(n:f:) %%files%{?-f: -f %{-f*}}%{?-n: -n %{-n*}} %{?1}\
80 @redhat@#%defattr(-,root,root,-)\
84 @mandrake@#---------------------------------------------------------------------
85 @mandrake@# Mandrake vendor specific macros
86 @mandrake@# XXX Add a support e-mail address here, please.
89 @mandrake@# XXX These values, particularly vendor, need to be regularized, please.
90 @mandrake@%_vendor MandrakeSoft
91 @mandrake@%_real_vendor mandrake
92 @mandrake@%_target_platform %{_target_cpu}-%{_real_vendor}-%{_target_os}
94 @mandrake@# XXX I'll make these the default linux values soon as I can.
95 @mandrake@%_libexecdir %{_libdir}
96 @mandrake@%_localstatedir %{_var}/lib
98 @mandrake@# XXX A copy of brp-mandrake, please. I'd suggest break down by
99 @mandrake@# functionality rather than vendor <shrug>.
100 @mandrake@%__os_install_post \
101 @mandrake@ @RPMCONFIGDIR@/brp-mandrake \
105 @mandrake@%_make_bin make
106 @mandrake@%make if [ -z "$NPROCS" -a -f /proc/stat ]; then NPROCS=`egrep -c ^cpu[0-9]+ /proc/stat || :`; fi \
107 @mandrake@if [ -z "$NPROCS" -o "$NPROCS" -le "0" ]; then \
108 @mandrake@ NPROCS=1 \
110 @mandrake@%{_make_bin} -j$NPROCS
112 @mandrake@# Menu directories
113 @mandrake@%_menudir %{_libdir}/menu
114 @mandrake@%_iconsdir %{_datadir}/icons
115 @mandrake@%_miconsdir %{_datadir}/icons/mini
116 @mandrake@%_liconsdir %{_datadir}/icons/large
118 @mandrake@# Update Menu
119 @mandrake@%_update_menus_bin %{_bindir}/update-menus
120 @mandrake@%update_menus if [ -x %{_update_menus_bin} ]; then %{_update_menus_bin} || true ; fi
122 @mandrake@# Clean Menu
123 @mandrake@%clean_menus if [ "$1" = "0" -a -x %{_update_menus_bin} ]; then %{_update_menus_bin} || true ; fi
125 @mandrake@# Update Window Managers session.
126 @mandrake@%_fndsession_bin %{_sbindir}/fndSession
127 @mandrake@%make_session if [ -x %{_fndsession_bin} ]; then %{_fndsession_bin} || true ; fi
129 @mandrake@# Where install-info is located
130 @mandrake@%__install_info /sbin/install-info
132 @mandrake@# Macros to install info-files.
133 @mandrake@%_install_info() %{__install_info} %{_infodir}/%{1}%{_extension} --dir=%{_infodir}/dir\;
135 @mandrake@# Macros to remove info-files. (keep the "alone on its line ';'")
136 @mandrake@%_remove_install_info() if [ "$1" = "0" ]; then %{__install_info} \\\
137 @mandrake@ %{_infodir}/%{1}%{_extension} --dir=%{_infodir}/dir --remove ; fi\
140 @mandrake@# Games macros
141 @mandrake@%_gamesdir games
142 @mandrake@%_gamesbindir %{_prefix}/%{_gamesdir}
143 @mandrake@%_gamesdatadir %{_datadir}/%{_gamesdir}