Permit files with glob characters in *.rpm packages (#147383)
[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 #==============================================================================
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 %_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")
38
39 @MULTILIBSTART@
40 #---------------------------------------------------------------------
41 #       Multilibs
42 %_multilibno            @MULTILIBNO@
43 %_multilibpatt          (/%{_lib}|/usr/%{_lib}(|/gconv)|/usr/local/%{_lib}|/usr/X11R6/%{_lib}|/opt/%{_lib})/[^/]*\\.([oa]|la|so[0-9.]*)$
44 @MULTILIBEND@
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@%_fixowner      [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root
75 @redhat@%_fixgroup      [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} @ROOT_GROUP@
76 @redhat@%_fixperms      %{__chmod} -Rf @FIXPERMS@
77 @redhat@#---------------------------------------------------------------------
78 @redhat@#       Always use %defattr(-,root,root) in %files (added in rpm-4.0.4)
79 @redhat@#
80 @redhat@#%files(n:f:)   %%files%{?-f: -f %{-f*}}%{?-n: -n %{-n*}} %{?1}\
81 @redhat@#%defattr(-,root,root,-)\
82 @redhat@#%{nil}
83
84
85 @apple@#---------------------------------------------------------------------
86 @apple@#        Apple Darwin vendor specific macros
87 @apple@#
88 @apple@%_use_internal_dependency_generator     0
89 @apple@%__so    dylib
90
91
92 @mandrake@#---------------------------------------------------------------------
93 @mandrake@#     Mandrake vendor specific macros
94 @mandrake@# XXX Add a support e-mail address here, please.
95 @mandrake@#
96 @mandrake@# XXX These values, particularly vendor, need to be regularized, please.
97 @mandrake@%_vendor              MandrakeSoft
98 @mandrake@%_real_vendor         mandrake
99 @mandrake@%_target_platform     %{_target_cpu}-%{_real_vendor}-%{_target_os}
100 @mandrake@
101 @mandrake@# XXX I'll make these the default linux values soon as I can.
102 @mandrake@%_libexecdir          %{_libdir}
103 @mandrake@%_localstatedir               %{_var}/lib
104 @mandrake@
105 @mandrake@# XXX A copy of brp-mandrake, please. I'd suggest break down by
106 @mandrake@#     functionality rather than vendor <shrug>.
107 @mandrake@%__os_install_post    \
108 @mandrake@    @RPMCONFIGDIR@/brp-mandrake \
109 @mandrake@%{nil}
110 @mandrake@
111 @mandrake@# make
112 @mandrake@%_make_bin make
113 @mandrake@%make if [ -z "$NPROCS" -a -f /proc/stat ]; then NPROCS=`egrep -c ^cpu[0-9]+ /proc/stat || :`; fi \
114 @mandrake@if [ -z "$NPROCS" -o "$NPROCS" -le "0" ]; then \
115 @mandrake@  NPROCS=1 \
116 @mandrake@fi \
117 @mandrake@%{_make_bin} -j$NPROCS
118 @mandrake@
119 @mandrake@# Menu directories
120 @mandrake@%_menudir %{_libdir}/menu
121 @mandrake@%_iconsdir %{_datadir}/icons
122 @mandrake@%_miconsdir %{_datadir}/icons/mini
123 @mandrake@%_liconsdir %{_datadir}/icons/large
124 @mandrake@
125 @mandrake@# Update Menu
126 @mandrake@%_update_menus_bin %{_bindir}/update-menus
127 @mandrake@%update_menus if [ -x %{_update_menus_bin} ]; then %{_update_menus_bin} || true ; fi
128 @mandrake@
129 @mandrake@# Clean Menu
130 @mandrake@%clean_menus if [ "$1" = "0" -a -x %{_update_menus_bin} ]; then %{_update_menus_bin} || true ; fi
131 @mandrake@
132 @mandrake@# Update Window Managers session.
133 @mandrake@%_fndsession_bin %{_sbindir}/fndSession
134 @mandrake@%make_session if [ -x %{_fndsession_bin} ]; then %{_fndsession_bin} || true ; fi
135 @mandrake@
136 @mandrake@#     Where install-info is located
137 @mandrake@%__install_info               /sbin/install-info
138 @mandrake@
139 @mandrake@#     Macros to install info-files.
140 @mandrake@%_install_info()      %{__install_info} %{_infodir}/%{1}%{_extension} --dir=%{_infodir}/dir\;
141 @mandrake@
142 @mandrake@#     Macros to remove info-files. (keep the "alone on its line ';'")
143 @mandrake@%_remove_install_info() if [ "$1" = "0" ]; then %{__install_info} \\\
144 @mandrake@ %{_infodir}/%{1}%{_extension} --dir=%{_infodir}/dir --remove ; fi\
145 @mandrake@%{nil}
146 @mandrake@
147 @mandrake@# Games macros
148 @mandrake@%_gamesdir    games
149 @mandrake@%_gamesbindir   %{_prefix}/%{_gamesdir}
150 @mandrake@%_gamesdatadir  %{_datadir}/%{_gamesdir}