Sanitize python object -> tag number exception handling
[platform/upstream/rpm.git] / platform.in
1 # Per-platform rpm configuration file.
2
3 #==============================================================================
4 # ---- per-platform macros.
5 #
6 %_arch                  @RPMCANONARCH@
7 %_vendor                @RPMCANONVENDOR@
8 %_os                    @RPMCANONOS@
9 %_gnu                   @RPMRC_GNU@
10 %_target_platform       %{_target_cpu}-%{_vendor}-%{_target_os}
11 %optflags               @RPMRC_OPTFLAGS@
12
13 %__isa_name             @ISANAME@
14 %__isa_bits             @ISABITS@
15 %__isa                  %{__isa_name}-%{__isa_bits}
16
17 #==============================================================================
18 # ---- configure macros.
19 #
20 %_prefix                @prefix@
21 %_exec_prefix           @exec_prefix@
22 %_bindir                @bindir@
23 %_sbindir               @sbindir@
24 %_libexecdir            @libexecdir@
25 %_datarootdir           @datarootdir@
26 %_datadir               @datadir@
27 %_sysconfdir            @sysconfdir@
28 %_sharedstatedir        @sharedstatedir@
29 %_localstatedir         @localstatedir@
30 %_lib                   @LIB@
31 %_libdir                @exec_prefix@/@LIB@
32 %_includedir            @includedir@
33 %_oldincludedir         @oldincludedir@
34 %_infodir               @infodir@
35 %_mandir                @mandir@
36 %_initddir              %{_sysconfdir}/rc.d/init.d
37 # Deprecated misspelling, present for backwards compatibility.
38 %_initrddir             %{_initddir}
39
40 %_defaultdocdir         %{_datadir}/doc
41
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")
45
46 #==============================================================================
47 # ---- Build policy macros.
48 #
49 #---------------------------------------------------------------------
50 #       Expanded at end of %install scriptlet.
51 #
52
53 %__arch_install_post   @ARCH_INSTALL_POST@
54
55 %__os_install_post    \
56     %{_rpmconfigdir}/brp-compress \
57     %{_rpmconfigdir}/brp-strip \
58     %{_rpmconfigdir}/brp-strip-static-archive \
59     %{_rpmconfigdir}/brp-strip-comment-note \
60 %{nil}
61
62 %__spec_install_post\
63     %{?__debug_package:%{__debug_install_post}}\
64     %{__arch_install_post}\
65     %{__os_install_post}\
66 %{nil}
67
68 @redhat@#---------------------------------------------------------------------
69 @redhat@#       Expanded at end of %prep
70 @redhat@#
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)
77 @redhat@#
78 @redhat@#%files(n:f:)   %%files%{?-f: -f %{-f*}}%{?-n: -n %{-n*}} %{?1}\
79 @redhat@#%defattr(-,root,root,-)\
80 @redhat@#%{nil}
81
82
83 @apple@#---------------------------------------------------------------------
84 @apple@#        Apple Darwin vendor specific macros
85 @apple@#
86 @apple@%_use_internal_dependency_generator     0
87 @apple@%__so    dylib
88
89
90 @mandrake@#---------------------------------------------------------------------
91 @mandrake@#     Mandrake vendor specific macros
92 @mandrake@# XXX Add a support e-mail address here, please.
93 @mandrake@#
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}
98 @mandrake@
99 @mandrake@# XXX I'll make these the default linux values soon as I can.
100 @mandrake@%_libexecdir          %{_libdir}
101 @mandrake@%_localstatedir               %{_var}/lib
102 @mandrake@
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 \
107 @mandrake@%{nil}
108 @mandrake@
109 @mandrake@# make
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 \
114 @mandrake@fi \
115 @mandrake@%{_make_bin} -j$NPROCS
116 @mandrake@
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
122 @mandrake@
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
126 @mandrake@
127 @mandrake@# Clean Menu
128 @mandrake@%clean_menus if [ "$1" = "0" -a -x %{_update_menus_bin} ]; then %{_update_menus_bin} || true ; fi
129 @mandrake@
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
133 @mandrake@
134 @mandrake@#     Where install-info is located
135 @mandrake@%__install_info               /sbin/install-info
136 @mandrake@
137 @mandrake@#     Macros to install info-files.
138 @mandrake@%_install_info()      %{__install_info} %{_infodir}/%{1}%{_extension} --dir=%{_infodir}/dir\;
139 @mandrake@
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\
143 @mandrake@%{nil}
144 @mandrake@
145 @mandrake@# Games macros
146 @mandrake@%_gamesdir    games
147 @mandrake@%_gamesbindir   %{_prefix}/%{_gamesdir}
148 @mandrake@%_gamesdatadir  %{_datadir}/%{_gamesdir}