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@
15 %__isa %{__isa_name}-%{__isa_bits}
17 #==============================================================================
18 # ---- configure macros.
21 %_exec_prefix @exec_prefix@
24 %_libexecdir @libexecdir@
25 %_datarootdir @datarootdir@
27 %_sysconfdir @sysconfdir@
28 %_sharedstatedir @sharedstatedir@
29 %_localstatedir @localstatedir@
31 %_libdir @exec_prefix@/@LIB@
32 %_includedir @includedir@
33 %_oldincludedir @oldincludedir@
36 %_initddir %{_sysconfdir}/rc.d/init.d
37 # Deprecated misspelling, present for backwards compatibility.
38 %_initrddir %{_initddir}
40 %_defaultdocdir %{_datadir}/doc
42 %_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
43 && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
44 [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
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-static-archive \
59 %{_rpmconfigdir}/brp-strip-comment-note \
63 %{?__debug_package:%{__debug_install_post}}\
64 %{__arch_install_post}\
68 @redhat@#---------------------------------------------------------------------
69 @redhat@# Expanded at end of %prep
71 @redhat@%__id_u @__ID_U@
72 @redhat@%__chown_Rhf @__CHOWN_RHF@
73 @redhat@%__chgrp_Rhf @__CHGRP_RHF@
74 @redhat@%_fixperms %{__chmod} -Rf @FIXPERMS@
75 @redhat@#---------------------------------------------------------------------
76 @redhat@# Always use %defattr(-,root,root) in %files (added in rpm-4.0.4)
78 @redhat@#%files(n:f:) %%files%{?-f: -f %{-f*}}%{?-n: -n %{-n*}} %{?1}\
79 @redhat@#%defattr(-,root,root,-)\
83 @apple@#---------------------------------------------------------------------
84 @apple@# Apple Darwin vendor specific macros
86 @apple@%_use_internal_dependency_generator 0
90 @mandrake@#---------------------------------------------------------------------
91 @mandrake@# Mandrake vendor specific macros
92 @mandrake@# XXX Add a support e-mail address here, please.
94 @mandrake@# XXX These values, particularly vendor, need to be regularized, please.
95 @mandrake@%_vendor MandrakeSoft
96 @mandrake@%_real_vendor mandrake
97 @mandrake@%_target_platform %{_target_cpu}-%{_real_vendor}-%{_target_os}
99 @mandrake@# XXX I'll make these the default linux values soon as I can.
100 @mandrake@%_libexecdir %{_libdir}
101 @mandrake@%_localstatedir %{_var}/lib
103 @mandrake@# XXX A copy of brp-mandrake, please. I'd suggest break down by
104 @mandrake@# functionality rather than vendor <shrug>.
105 @mandrake@%__os_install_post \
106 @mandrake@ %{_rpmconfigdir}/brp-mandrake \
110 @mandrake@%_make_bin make
111 @mandrake@%make if [ -z "$NPROCS" -a -f /proc/stat ]; then NPROCS=`egrep -c ^cpu[0-9]+ /proc/stat || :`; fi \
112 @mandrake@if [ -z "$NPROCS" -o "$NPROCS" -le "0" ]; then \
113 @mandrake@ NPROCS=1 \
115 @mandrake@%{_make_bin} -j$NPROCS
117 @mandrake@# Menu directories
118 @mandrake@%_menudir %{_libdir}/menu
119 @mandrake@%_iconsdir %{_datadir}/icons
120 @mandrake@%_miconsdir %{_datadir}/icons/mini
121 @mandrake@%_liconsdir %{_datadir}/icons/large
123 @mandrake@# Update Menu
124 @mandrake@%_update_menus_bin %{_bindir}/update-menus
125 @mandrake@%update_menus if [ -x %{_update_menus_bin} ]; then %{_update_menus_bin} || true ; fi
127 @mandrake@# Clean Menu
128 @mandrake@%clean_menus if [ "$1" = "0" -a -x %{_update_menus_bin} ]; then %{_update_menus_bin} || true ; fi
130 @mandrake@# Update Window Managers session.
131 @mandrake@%_fndsession_bin %{_sbindir}/fndSession
132 @mandrake@%make_session if [ -x %{_fndsession_bin} ]; then %{_fndsession_bin} || true ; fi
134 @mandrake@# Where install-info is located
135 @mandrake@%__install_info /sbin/install-info
137 @mandrake@# Macros to install info-files.
138 @mandrake@%_install_info() %{__install_info} %{_infodir}/%{1}%{_extension} --dir=%{_infodir}/dir\;
140 @mandrake@# Macros to remove info-files. (keep the "alone on its line ';'")
141 @mandrake@%_remove_install_info() if [ "$1" = "0" ]; then %{__install_info} \\\
142 @mandrake@ %{_infodir}/%{1}%{_extension} --dir=%{_infodir}/dir --remove ; fi\
145 @mandrake@# Games macros
146 @mandrake@%_gamesdir games
147 @mandrake@%_gamesbindir %{_prefix}/%{_gamesdir}
148 @mandrake@%_gamesdatadir %{_datadir}/%{_gamesdir}