Yet another patial harlink set fix.
[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 @MULTILIBSTART@
76 #---------------------------------------------------------------------
77 #       Multilibs
78 %_multilibno            @MULTILIBNO@
79 %_multilibpatt          (/%{_lib}|/usr/%{_lib}(|/gconv)|/usr/local/%{_lib}|/usr/X11R6/%{_lib}|/opt/%{_lib})/[^/]*\\.([oa]|la|so[0-9.]*)$
80 @MULTILIBEND@
81
82 #==============================================================================
83 # ---- Build policy macros.
84 #
85 #---------------------------------------------------------------------
86 #       Expanded at end of %install scriptlet.
87 #
88
89 %__arch_install_post   @ARCH_INSTALL_POST@
90
91 %__os_install_post    \
92     @prefix@/lib/rpm/brp-compress \
93     @prefix@/lib/rpm/brp-strip \
94     @prefix@/lib/rpm/brp-strip-comment-note \
95 %{nil}
96
97 %__spec_install_post\
98     %{__arch_install_post}\
99     %{__os_install_post}\
100 %{nil}
101
102 @redhat@#---------------------------------------------------------------------
103 @redhat@#       Expanded at end of %prep
104 @redhat@#
105 @redhat@%__id_u         @__ID_U@
106 @redhat@%__chown_Rhf    @__CHOWN_RHF@
107 @redhat@%__chgrp_Rhf    @__CHGRP_RHF@
108 @redhat@%_fixowner      [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root
109 @redhat@%_fixgroup      [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} @ROOT_GROUP@
110 @redhat@%_fixperms      %{__chmod} -Rf @FIXPERMS@
111
112 @mandrake@#---------------------------------------------------------------------
113 @mandrake@#     Mandrake vendor specific macros
114 @mandrake@# XXX Add a support e-mail address here, please.
115 @mandrake@#
116 @mandrake@#
117 @mandrake@# XXX These values, particularly vendor, need to be regularized, please.
118 @mandrake@%_vendor              MandrakeSoft
119 @mandrake@%_real_vendor         mandrake
120 @mandrake@%_target_platform     %{_target_cpu}-%{_real_vendor}-%{_target_os}
121 @mandrake@
122 @mandrake@# XXX I'll make these the default linux values soon as I can.
123 @mandrake@%_libexecdir          %{_libdir}
124 @mandrake@%_localstatedir               %{_var}/lib
125 @mandrake@
126 @mandrake@# XXX A copy of brp-mandrake, please. I'd suggest break down by
127 @mandrake@#     functionality rather than vendor <shrug>.
128 @mandrake@%__os_install_post    \
129 @mandrake@    /usr/lib/rpm/brp-mandrake \
130 @mandrake@%{nil}
131 @mandrake@
132 @mandrake@# make
133 @mandrake@%_make_bin make
134 @mandrake@%make if [ -z "$NPROCS" -a -f /proc/stat ]; then NPROCS=`egrep -c ^cpu[0-9]+ /proc/stat || :`; fi \
135 @mandrake@if [ -z "$NPROCS" -o "$NPROCS" -le "0" ]; then \
136 @mandrake@  NPROCS=1 \
137 @mandrake@fi \
138 @mandrake@%{_make_bin} -j$NPROCS
139 @mandrake@
140 @mandrake@# Menu directories
141 @mandrake@%_menudir %{_libdir}/menu
142 @mandrake@%_iconsdir %{_datadir}/icons
143 @mandrake@%_miconsdir %{_datadir}/icons/mini
144 @mandrake@%_liconsdir %{_datadir}/icons/large
145 @mandrake@
146 @mandrake@# Update Menu
147 @mandrake@%_update_menus_bin %{_bindir}/update-menus
148 @mandrake@%update_menus if [ -x %{_update_menus_bin} ]; then %{_update_menus_bin} || true ; fi
149 @mandrake@
150 @mandrake@# Clean Menu
151 @mandrake@%clean_menus if [ "$1" = "0" -a -x %{_update_menus_bin} ]; then %{_update_menus_bin} || true ; fi
152 @mandrake@
153 @mandrake@# Update Window Managers session.
154 @mandrake@%_fndsession_bin %{_sbindir}/fndSession
155 @mandrake@%make_session if [ -x %{_fndsession_bin} ]; then %{_fndsession_bin} || true ; fi
156 @mandrake@
157 @mandrake@#     Where install-info is located
158 @mandrake@%__install_info               /sbin/install-info
159 @mandrake@
160 @mandrake@#     Macros to install info-files.
161 @mandrake@%_install_info()      %{__install_info} %{_infodir}/%{1}%{_extension} --dir=%{_infodir}/dir\;
162 @mandrake@
163 @mandrake@#     Macros to remove info-files. (keep the "alone on its line ';'")
164 @mandrake@%_remove_install_info() if [ "$1" = "0" ]; then %{__install_info} \\\
165 @mandrake@ %{_infodir}/%{1}%{_extension} --dir=%{_infodir}/dir --remove ; fi\
166 @mandrake@%{nil}
167 @mandrake@
168 @mandrake@# Games macros
169 @mandrake@%_gamesdir    games
170 @mandrake@%_gamesbindir   %{_prefix}/%{_gamesdir}
171 @mandrake@%_gamesdatadir  %{_datadir}/%{_gamesdir}