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
95 # Template for lang sub-package.
97 %package %{-n:-n %{-n*}-}lang \
98 Summary: Languages for package %{name} \
99 Group: System/Localization \
100 Requires: %{-n:%{-n*}}%{!-n:%{name}} = %{version} \
101 Provides: %{-n:%{-n*}}%{!-n:%{name}}-lang-all = %{version} \
102 Supplements: packageand(bundle-lang-other:%{-n:%{-n*}}%{!-n:%{name}}) \
104 %description %{-n:-n %{-n*}-}lang \
105 Provides translations to the package %{name}
112 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
113 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
114 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
115 ./configure --build=%{_build} --host=%{_host} \\\
116 --target=%{_target_platform} \\\
117 --program-prefix=%{?_program_prefix} \\\
118 --prefix=%{_prefix} \\\
119 --exec-prefix=%{_exec_prefix} \\\
120 --bindir=%{_bindir} \\\
121 --sbindir=%{_sbindir} \\\
122 --sysconfdir=%{_sysconfdir} \\\
123 --datadir=%{_datadir} \\\
124 --includedir=%{_includedir} \\\
125 --libdir=%{_libdir} \\\
126 --libexecdir=%{_libexecdir} \\\
127 --localstatedir=%{_localstatedir} \\\
128 --sharedstatedir=%{_sharedstatedir} \\\
129 --mandir=%{_mandir} \\\
130 --infodir=%{_infodir}
134 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
135 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
136 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
137 autoreconf -v --install --force || exit 1 \
138 ./configure --build=%{_build} --host=%{_host} \\\
139 --target=%{_target_platform} \\\
140 --program-prefix=%{?_program_prefix} \\\
141 --prefix=%{_prefix} \\\
142 --exec-prefix=%{_exec_prefix} \\\
143 --bindir=%{_bindir} \\\
144 --sbindir=%{_sbindir} \\\
145 --sysconfdir=%{_sysconfdir} \\\
146 --datadir=%{_datadir} \\\
147 --includedir=%{_includedir} \\\
148 --libdir=%{_libdir} \\\
149 --libexecdir=%{_libexecdir} \\\
150 --localstatedir=%{_localstatedir} \\\
151 --sharedstatedir=%{_sharedstatedir} \\\
152 --mandir=%{_mandir} \\\
153 --infodir=%{_infodir}
156 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
157 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
158 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
159 ./autogen.sh --build=%{_build} --host=%{_host} \\\
160 --target=%{_target_platform} \\\
161 --program-prefix=%{?_program_prefix} \\\
162 --prefix=%{_prefix} \\\
163 --exec-prefix=%{_exec_prefix} \\\
164 --bindir=%{_bindir} \\\
165 --sbindir=%{_sbindir} \\\
166 --sysconfdir=%{_sysconfdir} \\\
167 --datadir=%{_datadir} \\\
168 --includedir=%{_includedir} \\\
169 --libdir=%{_libdir} \\\
170 --libexecdir=%{_libexecdir} \\\
171 --localstatedir=%{_localstatedir} \\\
172 --sharedstatedir=%{_sharedstatedir} \\\
173 --mandir=%{_mandir} \\\
174 --infodir=%{_infodir}
179 prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\
180 exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\
181 bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\
182 sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\
183 sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\
184 datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\
185 includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\
186 libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\
187 libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\
188 localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\
189 sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\
190 mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\
191 infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\
197 DESTDIR=%{?buildroot:%{buildroot}} \\\
198 INSTALL_ROOT=%{?buildroot:%{buildroot}} \\\
200 rm -f %{?buildroot:%{buildroot}}%{_infodir}/dir \
201 find %{?buildroot:%{buildroot}} -regex ".*\\.la$" | xargs rm -f -- \
202 %{!?keepstatic:find %{?buildroot:%{buildroot}} -regex ".*\\.a$" | xargs rm -f --}
204 %_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
205 && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
206 [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
211 Summary: Translations and Locale for package %{name}\
215 This package provides translations for package %{name}.\
216 %files locale -f %{name}.lang\
217 %defattr(-,root,root,-)\
223 Summary: Documentation for package %{name}\
224 Group: Documentation\
227 This package provides documentation for package %{name}.\
228 %files docs -f documentation.list\
229 %defattr(-,root,root,-)\
234 # Bad hack to set $LANG to C during all RPM builds
246 CFLAGS="%optflags" ; export CFLAGS ; \
247 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
248 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
249 LD_AS_NEEDED=1; export LD_AS_NEEDED ; \
252 %install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\
257 rm -rf %{?buildroot:%{buildroot}} \
258 mkdir -p %{?buildroot:%{buildroot}} \
263 rm -rf %{?buildroot:%{buildroot}} \
266 %find_lang /usr/lib/rpm/find-lang.sh %{buildroot}
267 %find_docs /usr/lib/rpm/tizen/find-docs.sh %{buildroot}
271 #==============================================================================
272 # ---- default .desktop directories per the desktop-entry freedesktop.org spec
274 %_desktopdir %{_datadir}/applications
276 #==============================================================================
277 # ---- Generic auto req/prov filtering macros
279 # http://fedoraproject.org/wiki/PackagingDrafts/AutoProvidesAndRequiresFiltering
281 # prevent anything matching from being scanned for provides
282 %filter_provides_in(P) %{expand: \
283 %global __filter_prov_cmd %{?__filter_prov_cmd} %{__grep} -v %{-P} '%*' | \
286 # prevent anything matching from being scanned for requires
287 %filter_requires_in(P) %{expand: \
288 %global __filter_req_cmd %{?__filter_req_cmd} %{__grep} -v %{-P} '%*' | \
291 # filter anything matching out of the provides stream
292 %filter_from_provides() %{expand: \
293 %global __filter_from_prov %{?__filter_from_prov} | %{__sed} -e '%*' \
296 # filter anything matching out of the requires stream
297 %filter_from_requires() %{expand: \
298 %global __filter_from_req %{?__filter_from_req} | %{__sed} -e '%*' \
301 # actually set up the filtering bits
302 %filter_setup %{expand: \
303 %global _use_internal_dependency_generator 0 \
304 %global __deploop() while read FILE; do /usr/lib/rpm/rpmdeps -%{1} ${FILE}; done | /bin/sort -u \
305 %global __find_provides /bin/sh -c "%{?__filter_prov_cmd} %{__deploop P} %{?__filter_from_prov}" \
306 %global __find_requires /bin/sh -c "%{?__filter_req_cmd} %{__deploop R} %{?__filter_from_req}" \
310 rm -rf %{?buildroot:%{buildroot}}%{_infodir} \
311 rm -rf %{?buildroot:%{buildroot}}%{_defaultdocdir} \
312 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc/%{name} \
313 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc/%{name}-%{version} \
314 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/gtk-doc \
315 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc \
316 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/man \
317 find %{?buildroot:%{buildroot}} -regex ".*/man/man./.*\.[0-9]" | xargs rm -f -- \
318 find %{?buildroot:%{buildroot}} -regex ".*/man/../man./.*\.[0-9]" | xargs rm -f -- \
319 find %{?buildroot:%{buildroot}} -regex ".*/man/man./.*\.[0-9]pm" | xargs rm -f --