2 %_infodir %{_prefix}/share/info
3 %_mandir %{_prefix}/share/man
6 %_defaultdocdir %{_usr}/share/doc/packages
8 # _rootprefix can be set to (/,%{_prefix}) to customize systemd installation)
9 %_rootprefix %{_prefix}
10 %_unitdir_user %{_prefix}/lib/systemd/user
11 %_unitdir %{_rootprefix}/lib/systemd/system
13 # package build macros
14 # %make_install make install DESTDIR=%{?buildroot}
15 # %makeinstall make DESTDIR=%{?buildroot:%{buildroot}} install
16 %rb_arch %(echo %{_host_cpu}-linux | sed -e "s/i686/i586/" -e "s/armv5tel/armv4l/" -e "s/hppa2.0/hppa/")
17 %rb_ver %(/usr/bin/ruby -e 'puts VERSION.sub(/\\\.\\\d$/, "")')
19 # Update config.sub file for packages not supporting current platform
20 %maybe_update_configsub \
22 [[ -e config.sub ]] && install -m 0755 $(automake --print-libdir)/config.sub config.sub \
26 # external kernel module helper macro(s)
27 %kernel_devel_uname_r %(/bin/rpm -q --provides $(/bin/rpm -q --whatprovides kernel-devel-uname-r) | sed -ne 's,kernel-devel-uname-r = ,, p')
28 %kernel_release %(/bin/rpm -q --queryformat '%{RPMTAG_VERSION}-%{RPMTAG_RELEASE}' $(/bin/rpm -q --whatprovides kernel))
29 %kernel_name %(/bin/rpm -q --queryformat '%{RPMTAG_NAME}' $(/bin/rpm -q --whatprovides kernel))
31 # this script calls all scripts in %{_rpmconfigdir}/brp-tizen.d
32 %__arch_install_post %{_rpmconfigdir}/check-buildroot
34 %__strip_install_post \
35 %{!?__debug_package:%{_rpmconfigdir}/brp-strip %{__strip}} \
36 %{_rpmconfigdir}/brp-strip-static-archive %{__strip} \
37 # %{_rpmconfigdir}/brp-strip-comment-note %{__strip} %{__objdump} \
41 %{_rpmconfigdir}//brp-compress \
42 %{!?_rpm_strip_disable:%{__strip_install_post}}\
43 %{_rpmconfigdir}/brp-python-hardlink \
44 %{!?disable_docs_package:%{_rpmconfigdir}/tizen/find-docs.sh %{buildroot}} \
47 # %{_rpmconfigdir}/tizen/brp-implant-ident-static
50 %{_rpmconfigdir}/tizen/find-isufiles.sh %{_builddir}/%{?buildsubdir}/isu.list \
54 %{?__debug_package:%{__debug_install_post}}\
55 %{__arch_install_post}\
57 %{__isu_install_post}\
60 # macro: %configure_kernel_source
63 %configure_kernel_source() \
64 if test -d /usr/src/linux ; then \
65 pushd /usr/src/linux \
66 test -f .config || cp arch/%_arch/defconfig.default .config \
67 yes "" | make oldconfig \
75 NUM_ARGS=${#ALL_ARGS[@]} \
76 if test -x /sbin/install-info ; then \
77 if test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \
78 /sbin/install-info "${ALL_ARGS[@]}" \
82 %install_info_delete(:-:) \
84 NUM_ARGS=${#ALL_ARGS[@]} \
85 if test -x /sbin/install-info ; then \
86 if ! test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \
87 /sbin/install-info --quiet --delete "${ALL_ARGS[@]}" \
91 # find-supplements.ksyms parses this macro directly out of the spec file:
92 %supplements_kernel_module() \
93 %{expand:%(if ! rpm -q kernel-syms > /dev/null; then echo "%fail Please add the kernel-syms package to BuildRequires"; fi)}
96 %cflags_profile_generate -fprofile-generate
97 %cflags_profile_feedback -fprofile-use
104 %maybe_update_configsub \
105 AR="%__ar"; export AR ; \
106 NM="%__nm"; export NM ; \
107 RANLIB="%__ranlib"; export RANLIB ; \
108 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
109 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
110 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
111 ./configure --build=%{_build} --host=%{_host} \\\
112 --program-prefix=%{?_program_prefix} \\\
113 --prefix=%{_prefix} \\\
114 --exec-prefix=%{_exec_prefix} \\\
115 --bindir=%{_bindir} \\\
116 --sbindir=%{_sbindir} \\\
117 --sysconfdir=%{_sysconfdir} \\\
118 --datadir=%{_datadir} \\\
119 --includedir=%{_includedir} \\\
120 --libdir=%{_libdir} \\\
121 --libexecdir=%{_libexecdir} \\\
122 --localstatedir=%{_localstatedir} \\\
123 --sharedstatedir=%{_sharedstatedir} \\\
124 --mandir=%{_mandir} \\\
125 --infodir=%{_infodir}
129 AR="%__ar"; export AR ; \
130 NM="%__nm"; export NM ; \
131 RANLIB="%__ranlib"; export RANLIB ; \
132 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
133 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
134 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
135 autoreconf -v --install --force || exit 1 \
136 ./configure --build=%{_build} --host=%{_host} \\\
137 --program-prefix=%{?_program_prefix} \\\
138 --prefix=%{_prefix} \\\
139 --exec-prefix=%{_exec_prefix} \\\
140 --bindir=%{_bindir} \\\
141 --sbindir=%{_sbindir} \\\
142 --sysconfdir=%{_sysconfdir} \\\
143 --datadir=%{_datadir} \\\
144 --includedir=%{_includedir} \\\
145 --libdir=%{_libdir} \\\
146 --libexecdir=%{_libexecdir} \\\
147 --localstatedir=%{_localstatedir} \\\
148 --sharedstatedir=%{_sharedstatedir} \\\
149 --mandir=%{_mandir} \\\
150 --infodir=%{_infodir}
153 AR="%__ar"; export AR ; \
154 NM="%__nm"; export NM ; \
155 RANLIB="%__ranlib"; export RANLIB ; \
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 --program-prefix=%{?_program_prefix} \\\
161 --prefix=%{_prefix} \\\
162 --exec-prefix=%{_exec_prefix} \\\
163 --bindir=%{_bindir} \\\
164 --sbindir=%{_sbindir} \\\
165 --sysconfdir=%{_sysconfdir} \\\
166 --datadir=%{_datadir} \\\
167 --includedir=%{_includedir} \\\
168 --libdir=%{_libdir} \\\
169 --libexecdir=%{_libexecdir} \\\
170 --localstatedir=%{_localstatedir} \\\
171 --sharedstatedir=%{_sharedstatedir} \\\
172 --mandir=%{_mandir} \\\
173 --infodir=%{_infodir}
178 prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\
179 exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\
180 bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\
181 sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\
182 sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\
183 datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\
184 includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\
185 libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\
186 libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\
187 localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\
188 sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\
189 mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\
190 infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\
196 DESTDIR=%{?buildroot:%{buildroot}} \\\
197 INSTALL_ROOT=%{?buildroot:%{buildroot}} \\\
199 rm -f %{?buildroot:%{buildroot}}%{_infodir}/dir \
200 find %{?buildroot:%{buildroot}} -regex ".*\\.la$" | xargs rm -f -- \
201 %{!?keepstatic:find %{?buildroot:%{buildroot}} -regex ".*\\.a$" | xargs rm -f --}
203 %_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
204 && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
205 [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
207 %lang_package(n:f:) \
208 %package %{-n:-n %{-n*}-}locale \
209 Summary: Translations and Locale for package %{name}\
210 Requires: %{-n:%{-n*}}%{!-n:%{name}} = %{version} \
211 Provides: %{-n:%{-n*}}%{!-n:%{name}}-lang-all = %{version} \
213 %description %{-n:-n %{-n*}-}locale\
214 This package provides translations for package %{name}.\
215 %files %{-n:-n %{-n*}-}locale -f %{-f:%{-f*}.lang} %{!-f:%{name}.lang}\
216 %defattr(-,root,root,-)\
221 Summary: Documentation for package %{name}\
224 This package provides documentation for package %{name}.\
225 %files docs -f documentation.list\
226 %defattr(-,root,root,-)\
231 Summary: ISU Package configuration \
234 This package provides ISU configuration for package %{name}.\
235 %files isu -f isu.list\
236 %defattr(-,root,root,-)\
239 # Bad hack to set $LANG to C during all RPM builds
251 CFLAGS="%optflags" ; export CFLAGS ; \
252 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
253 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
254 LDFLAGS="${LDFLAGS:-%{?global_LDFLAGS}}"; export LDFLAGS ; \
257 %install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\
261 %{?_enable_binutils_strip:export STRIP_DEFAULT_PACKAGE="binutils"} \
263 rm -rf %{?buildroot:%{buildroot}} \
264 mkdir -p %{?buildroot:%{buildroot}} \
269 rm -rf %{?buildroot:%{buildroot}} \
272 %find_lang %{_rpmconfigdir}/find-lang.sh %{buildroot}
273 %find_docs %{_rpmconfigdir}/tizen/find-docs.sh %{buildroot}
277 #==============================================================================
278 # ---- default .desktop directories per the desktop-entry freedesktop.org spec
280 %_desktopdir %{_datadir}/applications
282 #==============================================================================
283 # ---- Generic auto req/prov filtering macros
285 # http://fedoraproject.org/wiki/PackagingDrafts/AutoProvidesAndRequiresFiltering
287 # prevent anything matching from being scanned for provides
288 %filter_provides_in(P) %{expand: \
289 %global __filter_prov_cmd %{?__filter_prov_cmd} %{__grep} -v %{-P} '%*' | \
292 # prevent anything matching from being scanned for requires
293 %filter_requires_in(P) %{expand: \
294 %global __filter_req_cmd %{?__filter_req_cmd} %{__grep} -v %{-P} '%*' | \
297 # filter anything matching out of the provides stream
298 %filter_from_provides() %{expand: \
299 %global __filter_from_prov %{?__filter_from_prov} | %{__sed} -e '%*' \
302 # filter anything matching out of the requires stream
303 %filter_from_requires() %{expand: \
304 %global __filter_from_req %{?__filter_from_req} | %{__sed} -e '%*' \
307 # actually set up the filtering bits
308 %filter_setup %{expand: \
309 %global _use_internal_dependency_generator 0 \
310 %global __deploop() while read FILE; do %{_rpmconfigdir}/rpmdeps -%{1} ${FILE}; done | /bin/sort -u \
311 %global __find_provides /bin/sh -c "%{?__filter_prov_cmd} %{__deploop P} %{?__filter_from_prov}" \
312 %global __find_requires /bin/sh -c "%{?__filter_req_cmd} %{__deploop R} %{?__filter_from_req}" \
316 rm -rf %{?buildroot:%{buildroot}}%{_infodir} \
317 rm -rf %{?buildroot:%{buildroot}}%{_defaultdocdir} \
318 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc/%{name} \
319 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc/%{name}-%{version} \
320 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/gtk-doc \
321 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc \
322 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/man \
323 find %{?buildroot:%{buildroot}} -regex ".*/man/man./.*\.[0-9]" | xargs rm -f -- \
324 find %{?buildroot:%{buildroot}} -regex ".*/man/../man./.*\.[0-9]" | xargs rm -f -- \
325 find %{?buildroot:%{buildroot}} -regex ".*/man/man./.*\.[0-9]pm" | xargs rm -f --
329 mkdir -p %{buildroot}/%{_unitdir}/%{1} \
330 ln -s ../%{2} %{buildroot}/%{_unitdir}/%{1}/%{2} \
334 %_fontsdir %{_usr}/share/fonts
335 %_ttfontsdir %{_fontsdir}/truetype
336 %_miscfontsdir %{_fontsdir}/misc
337 %_fontsconfdir %{_sysconfdir}/fonts
338 %_fontsconfddir %{_fontsconfdir}/conf.d
339 %_fontsconfavaildir %{_datadir}/%{name}/conf.avail
343 Summary: Development files for package %{name}\
346 This package provides header files and other developer releated files for package %{name}.\
349 %{_libdir}/pkgconfig/*.pc\
353 %devel_desc This package contains all necessary include files and libraries needed \
354 to develop applications that require %{name}.\
357 %posttrans(n:) %%posttrans %{?-n:-n %{-n*}}%{*} \
358 echo "Running %{?-n:%{-n*}}%{!?-n:%{name}%{?1:-%{1}}} %%posttrans script" \
361 %_debug_manifest %{_rpmconfigdir}/debug.manifest
363 %_install_debug_manifest \
364 cp %{_debug_manifest} %{_builddir}/%{?buildsubdir}/%{name}-debuginfo.manifest \
365 cp %{_debug_manifest} %{_builddir}/%{?buildsubdir}/%{name}-debugsource.manifest \
368 %_buildinfo "Tizen %tizen_full_version"\
369 "%_project/%_repository"\
370 "%(gcc --version | head -n 1)-%(rpm -q gcc --queryformat \"%{VCS}\" | sed -e 's/.*\#//')"\