2 %_infodir %{_prefix}/share/info
3 %_mandir %{_prefix}/share/man
6 %_defaultdocdir %{_usr}/share/doc/packages
9 %make_install make install DESTDIR=%{?buildroot}
10 %makeinstall make DESTDIR=%{?buildroot:%{buildroot}} install
11 %rb_arch %(echo %{_host_cpu}-linux | sed -e "s/i686/i586/" -e "s/armv5tel/armv4l/" -e "s/hppa2.0/hppa/")
12 %rb_ver %(/usr/bin/ruby -e 'puts VERSION.sub(/\\\.\\\d$/, "")')
14 # this script calls all scripts in /usr/lib/rpm/brp-tizen.d
16 /usr/lib/rpm/brp-compress \
17 /usr/lib/rpm/brp-tizen \
18 %{!?disable_docs_package:/usr/lib/rpm/tizen/find-docs.sh %{buildroot}} \
21 # macro: %restart_on_update()
22 # Used to restart a service in postun section, if we are
23 # not running from YaST2 in instsys on update.
24 %restart_on_update() \
25 test -n "$FIRST_ARG" || FIRST_ARG=$1 \
26 if test "$FIRST_ARG" -ge 1 ; then \
27 test -f /etc/sysconfig/services && . /etc/sysconfig/services \
28 if test "$YAST_IS_RUNNING" != "instsys" -a "$DISABLE_RESTART_ON_UPDATE" != yes ; then \
29 for service in %{?*} ; do \
30 /etc/init.d/$service try-restart > /dev/null || : \
36 # macro: %stop_on_removal()
37 # Used to stop a service in preun section, if we are
38 # not running from YaST2 in instsys on removal of this package.
40 test -n "$FIRST_ARG" || FIRST_ARG=$1 \
41 if test "$FIRST_ARG" = "0" ; then \
42 test -f /etc/sysconfig/services && . /etc/sysconfig/services \
43 if test "$YAST_IS_RUNNING" != "instsys" -a "$DISABLE_STOP_ON_REMOVAL" != yes ; then \
44 for service in %{?*} ; do \
45 /etc/init.d/$service stop > /dev/null \
50 # macro: %configure_kernel_source
53 %configure_kernel_source() \
54 if test -d /usr/src/linux ; then \
55 pushd /usr/src/linux \
56 test -f .config || cp arch/%_arch/defconfig.default .config \
57 yes "" | make oldconfig \
63 %is_plus %(if test -f /.buildenv ; then source /.buildenv ; if [[ "$BUILD_BASENAME" == *+kde ]] ; then echo 1 ; else echo 0 ; fi ; else echo 0 ; fi)
68 NUM_ARGS=${#ALL_ARGS[@]} \
69 if test -x /sbin/install-info ; then \
70 if test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \
71 /sbin/install-info "${ALL_ARGS[@]}" \
75 %install_info_delete(:-:) \
77 NUM_ARGS=${#ALL_ARGS[@]} \
78 if test -x /sbin/install-info ; then \
79 if ! test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \
80 /sbin/install-info --quiet --delete "${ALL_ARGS[@]}" \
84 # find-supplements.ksyms parses this macro directly out of the spec file:
85 %supplements_kernel_module() \
86 %{expand:%(if ! rpm -q kernel-syms > /dev/null; then echo "%fail Please add the kernel-syms package to BuildRequires"; fi)}
91 %cflags_profile_generate -fprofile-generate
92 %cflags_profile_feedback -fprofile-use
101 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
102 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
103 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
104 ./configure --build=%{_build} --host=%{_host} \\\
105 --target=%{_target_platform} \\\
106 --program-prefix=%{?_program_prefix} \\\
107 --prefix=%{_prefix} \\\
108 --exec-prefix=%{_exec_prefix} \\\
109 --bindir=%{_bindir} \\\
110 --sbindir=%{_sbindir} \\\
111 --sysconfdir=%{_sysconfdir} \\\
112 --datadir=%{_datadir} \\\
113 --includedir=%{_includedir} \\\
114 --libdir=%{_libdir} \\\
115 --libexecdir=%{_libexecdir} \\\
116 --localstatedir=%{_localstatedir} \\\
117 --sharedstatedir=%{_sharedstatedir} \\\
118 --mandir=%{_mandir} \\\
119 --infodir=%{_infodir}
123 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
124 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
125 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
126 autoreconf -v --install --force || exit 1 \
127 ./configure --build=%{_build} --host=%{_host} \\\
128 --target=%{_target_platform} \\\
129 --program-prefix=%{?_program_prefix} \\\
130 --prefix=%{_prefix} \\\
131 --exec-prefix=%{_exec_prefix} \\\
132 --bindir=%{_bindir} \\\
133 --sbindir=%{_sbindir} \\\
134 --sysconfdir=%{_sysconfdir} \\\
135 --datadir=%{_datadir} \\\
136 --includedir=%{_includedir} \\\
137 --libdir=%{_libdir} \\\
138 --libexecdir=%{_libexecdir} \\\
139 --localstatedir=%{_localstatedir} \\\
140 --sharedstatedir=%{_sharedstatedir} \\\
141 --mandir=%{_mandir} \\\
142 --infodir=%{_infodir}
145 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
146 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
147 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
148 ./autogen.sh --build=%{_build} --host=%{_host} \\\
149 --target=%{_target_platform} \\\
150 --program-prefix=%{?_program_prefix} \\\
151 --prefix=%{_prefix} \\\
152 --exec-prefix=%{_exec_prefix} \\\
153 --bindir=%{_bindir} \\\
154 --sbindir=%{_sbindir} \\\
155 --sysconfdir=%{_sysconfdir} \\\
156 --datadir=%{_datadir} \\\
157 --includedir=%{_includedir} \\\
158 --libdir=%{_libdir} \\\
159 --libexecdir=%{_libexecdir} \\\
160 --localstatedir=%{_localstatedir} \\\
161 --sharedstatedir=%{_sharedstatedir} \\\
162 --mandir=%{_mandir} \\\
163 --infodir=%{_infodir}
168 prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\
169 exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\
170 bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\
171 sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\
172 sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\
173 datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\
174 includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\
175 libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\
176 libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\
177 localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\
178 sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\
179 mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\
180 infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\
186 DESTDIR=%{?buildroot:%{buildroot}} \\\
187 INSTALL_ROOT=%{?buildroot:%{buildroot}} \\\
189 rm -f %{?buildroot:%{buildroot}}%{_infodir}/dir \
190 find %{?buildroot:%{buildroot}} -regex ".*\\.la$" | xargs rm -f -- \
191 %{!?keepstatic:find %{?buildroot:%{buildroot}} -regex ".*\\.a$" | xargs rm -f --}
193 %_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
194 && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
195 [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
197 %lang_package(n:f:) \
198 %package %{-n:-n %{-n*}-}locale \
199 Summary: Translations and Locale for package %{name}\
200 Group: System/Localization\
201 Requires: %{-n:%{-n*}}%{!-n:%{name}} = %{version} \
202 Provides: %{-n:%{-n*}}%{!-n:%{name}}-lang-all = %{version} \
204 %description %{-n:-n %{-n*}-}locale\
205 This package provides translations for package %{name}.\
206 %files %{-n:-n %{-n*}-}locale -f %{-f:%{-f*}.lang} %{!-f:%{name}.lang}\
207 %defattr(-,root,root,-)\
211 # Bad hack to set $LANG to C during all RPM builds
223 CFLAGS="%optflags" ; export CFLAGS ; \
224 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
225 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
226 LD_AS_NEEDED=1; export LD_AS_NEEDED ; \
229 %install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\
234 rm -rf %{?buildroot:%{buildroot}} \
235 mkdir -p %{?buildroot:%{buildroot}} \
240 rm -rf %{?buildroot:%{buildroot}} \
243 %find_lang /usr/lib/rpm/find-lang.sh %{buildroot}
244 %find_docs /usr/lib/rpm/tizen/find-docs.sh %{buildroot}
248 #==============================================================================
249 # ---- default .desktop directories per the desktop-entry freedesktop.org spec
251 %_desktopdir %{_datadir}/applications
253 #==============================================================================
254 # ---- Generic auto req/prov filtering macros
256 # http://fedoraproject.org/wiki/PackagingDrafts/AutoProvidesAndRequiresFiltering
258 # prevent anything matching from being scanned for provides
259 %filter_provides_in(P) %{expand: \
260 %global __filter_prov_cmd %{?__filter_prov_cmd} %{__grep} -v %{-P} '%*' | \
263 # prevent anything matching from being scanned for requires
264 %filter_requires_in(P) %{expand: \
265 %global __filter_req_cmd %{?__filter_req_cmd} %{__grep} -v %{-P} '%*' | \
268 # filter anything matching out of the provides stream
269 %filter_from_provides() %{expand: \
270 %global __filter_from_prov %{?__filter_from_prov} | %{__sed} -e '%*' \
273 # filter anything matching out of the requires stream
274 %filter_from_requires() %{expand: \
275 %global __filter_from_req %{?__filter_from_req} | %{__sed} -e '%*' \
278 # actually set up the filtering bits
279 %filter_setup %{expand: \
280 %global _use_internal_dependency_generator 0 \
281 %global __deploop() while read FILE; do /usr/lib/rpm/rpmdeps -%{1} ${FILE}; done | /bin/sort -u \
282 %global __find_provides /bin/sh -c "%{?__filter_prov_cmd} %{__deploop P} %{?__filter_from_prov}" \
283 %global __find_requires /bin/sh -c "%{?__filter_req_cmd} %{__deploop R} %{?__filter_from_req}" \
287 rm -rf %{?buildroot:%{buildroot}}%{_infodir} \
288 rm -rf %{?buildroot:%{buildroot}}%{_defaultdocdir} \
289 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc/%{name} \
290 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc/%{name}-%{version} \
291 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/gtk-doc \
292 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc \
293 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/man \
294 find %{?buildroot:%{buildroot}} -regex ".*/man/man./.*\.[0-9]" | xargs rm -f -- \
295 find %{?buildroot:%{buildroot}} -regex ".*/man/../man./.*\.[0-9]" | xargs rm -f -- \
296 find %{?buildroot:%{buildroot}} -regex ".*/man/man./.*\.[0-9]pm" | xargs rm -f --