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 # external kernel module helper macro(s)
20 %kernel_devel_uname_r %(/bin/rpm -q --provides $(/bin/rpm -q --whatprovides kernel-devel-uname-r) | sed -ne 's,kernel-devel-uname-r = ,, p')
21 %kernel_release %(/bin/rpm -q --queryformat '%{RPMTAG_VERSION}-%{RPMTAG_RELEASE}' $(/bin/rpm -q --whatprovides kernel))
22 %kernel_name %(/bin/rpm -q --queryformat '%{RPMTAG_NAME}' $(/bin/rpm -q --whatprovides kernel))
24 # this script calls all scripts in %{_rpmconfigdir}/brp-tizen.d
25 %__arch_install_post %{_rpmconfigdir}/check-buildroot
27 %__strip_install_post \
28 %{!?__debug_package:%{_rpmconfigdir}/brp-strip %{__strip}} \
29 %{_rpmconfigdir}/brp-strip-static-archive %{__strip} \
30 # %{_rpmconfigdir}/brp-strip-comment-note %{__strip} %{__objdump} \
34 %{_rpmconfigdir}//brp-compress \
35 %{!?_rpm_strip_disable:%{__strip_install_post}}\
36 %{_rpmconfigdir}/brp-python-hardlink \
37 %{!?disable_docs_package:%{_rpmconfigdir}/tizen/find-docs.sh %{buildroot}} \
40 # %{_rpmconfigdir}/tizen/brp-implant-ident-static
43 %{_rpmconfigdir}/tizen/find-isufiles.sh %{_builddir}/%{?buildsubdir}/isu.list \
47 %{?__debug_package:%{__debug_install_post}}\
48 %{__arch_install_post}\
50 %{__isu_install_post}\
53 # macro: %configure_kernel_source
56 %configure_kernel_source() \
57 if test -d /usr/src/linux ; then \
58 pushd /usr/src/linux \
59 test -f .config || cp arch/%_arch/defconfig.default .config \
60 yes "" | make oldconfig \
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)}
89 %cflags_profile_generate -fprofile-generate
90 %cflags_profile_feedback -fprofile-use
97 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
98 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
99 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
100 ./configure --build=%{_build} --host=%{_host} \\\
101 --program-prefix=%{?_program_prefix} \\\
102 --prefix=%{_prefix} \\\
103 --exec-prefix=%{_exec_prefix} \\\
104 --bindir=%{_bindir} \\\
105 --sbindir=%{_sbindir} \\\
106 --sysconfdir=%{_sysconfdir} \\\
107 --datadir=%{_datadir} \\\
108 --includedir=%{_includedir} \\\
109 --libdir=%{_libdir} \\\
110 --libexecdir=%{_libexecdir} \\\
111 --localstatedir=%{_localstatedir} \\\
112 --sharedstatedir=%{_sharedstatedir} \\\
113 --mandir=%{_mandir} \\\
114 --infodir=%{_infodir}
118 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
119 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
120 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
121 autoreconf -v --install --force || exit 1 \
122 ./configure --build=%{_build} --host=%{_host} \\\
123 --program-prefix=%{?_program_prefix} \\\
124 --prefix=%{_prefix} \\\
125 --exec-prefix=%{_exec_prefix} \\\
126 --bindir=%{_bindir} \\\
127 --sbindir=%{_sbindir} \\\
128 --sysconfdir=%{_sysconfdir} \\\
129 --datadir=%{_datadir} \\\
130 --includedir=%{_includedir} \\\
131 --libdir=%{_libdir} \\\
132 --libexecdir=%{_libexecdir} \\\
133 --localstatedir=%{_localstatedir} \\\
134 --sharedstatedir=%{_sharedstatedir} \\\
135 --mandir=%{_mandir} \\\
136 --infodir=%{_infodir}
139 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
140 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
141 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
142 ./autogen.sh --build=%{_build} --host=%{_host} \\\
143 --program-prefix=%{?_program_prefix} \\\
144 --prefix=%{_prefix} \\\
145 --exec-prefix=%{_exec_prefix} \\\
146 --bindir=%{_bindir} \\\
147 --sbindir=%{_sbindir} \\\
148 --sysconfdir=%{_sysconfdir} \\\
149 --datadir=%{_datadir} \\\
150 --includedir=%{_includedir} \\\
151 --libdir=%{_libdir} \\\
152 --libexecdir=%{_libexecdir} \\\
153 --localstatedir=%{_localstatedir} \\\
154 --sharedstatedir=%{_sharedstatedir} \\\
155 --mandir=%{_mandir} \\\
156 --infodir=%{_infodir}
161 prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\
162 exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\
163 bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\
164 sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\
165 sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\
166 datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\
167 includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\
168 libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\
169 libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\
170 localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\
171 sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\
172 mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\
173 infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\
179 DESTDIR=%{?buildroot:%{buildroot}} \\\
180 INSTALL_ROOT=%{?buildroot:%{buildroot}} \\\
182 rm -f %{?buildroot:%{buildroot}}%{_infodir}/dir \
183 find %{?buildroot:%{buildroot}} -regex ".*\\.la$" | xargs rm -f -- \
184 %{!?keepstatic:find %{?buildroot:%{buildroot}} -regex ".*\\.a$" | xargs rm -f --}
186 %_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
187 && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
188 [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
190 %lang_package(n:f:) \
191 %package %{-n:-n %{-n*}-}locale \
192 Summary: Translations and Locale for package %{name}\
193 Requires: %{-n:%{-n*}}%{!-n:%{name}} = %{version} \
194 Provides: %{-n:%{-n*}}%{!-n:%{name}}-lang-all = %{version} \
196 %description %{-n:-n %{-n*}-}locale\
197 This package provides translations for package %{name}.\
198 %files %{-n:-n %{-n*}-}locale -f %{-f:%{-f*}.lang} %{!-f:%{name}.lang}\
199 %defattr(-,root,root,-)\
204 Summary: Documentation for package %{name}\
207 This package provides documentation for package %{name}.\
208 %files docs -f documentation.list\
209 %defattr(-,root,root,-)\
214 Summary: ISU Package configuration \
217 This package provides ISU configuration for package %{name}.\
218 %files isu -f isu.list\
219 %defattr(-,root,root,-)\
222 # Bad hack to set $LANG to C during all RPM builds
234 CFLAGS="%optflags" ; export CFLAGS ; \
235 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
236 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
237 LDFLAGS="${LDFLAGS:-%{?global_LDFLAGS}}"; export LDFLAGS ; \
240 %install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\
244 %{?_enable_binutils_strip:export STRIP_DEFAULT_PACKAGE="binutils"} \
246 rm -rf %{?buildroot:%{buildroot}} \
247 mkdir -p %{?buildroot:%{buildroot}} \
252 rm -rf %{?buildroot:%{buildroot}} \
255 %find_lang %{_rpmconfigdir}/find-lang.sh %{buildroot}
256 %find_docs %{_rpmconfigdir}/tizen/find-docs.sh %{buildroot}
260 #==============================================================================
261 # ---- default .desktop directories per the desktop-entry freedesktop.org spec
263 %_desktopdir %{_datadir}/applications
265 #==============================================================================
266 # ---- Generic auto req/prov filtering macros
268 # http://fedoraproject.org/wiki/PackagingDrafts/AutoProvidesAndRequiresFiltering
270 # prevent anything matching from being scanned for provides
271 %filter_provides_in(P) %{expand: \
272 %global __filter_prov_cmd %{?__filter_prov_cmd} %{__grep} -v %{-P} '%*' | \
275 # prevent anything matching from being scanned for requires
276 %filter_requires_in(P) %{expand: \
277 %global __filter_req_cmd %{?__filter_req_cmd} %{__grep} -v %{-P} '%*' | \
280 # filter anything matching out of the provides stream
281 %filter_from_provides() %{expand: \
282 %global __filter_from_prov %{?__filter_from_prov} | %{__sed} -e '%*' \
285 # filter anything matching out of the requires stream
286 %filter_from_requires() %{expand: \
287 %global __filter_from_req %{?__filter_from_req} | %{__sed} -e '%*' \
290 # actually set up the filtering bits
291 %filter_setup %{expand: \
292 %global _use_internal_dependency_generator 0 \
293 %global __deploop() while read FILE; do %{_rpmconfigdir}/rpmdeps -%{1} ${FILE}; done | /bin/sort -u \
294 %global __find_provides /bin/sh -c "%{?__filter_prov_cmd} %{__deploop P} %{?__filter_from_prov}" \
295 %global __find_requires /bin/sh -c "%{?__filter_req_cmd} %{__deploop R} %{?__filter_from_req}" \
299 rm -rf %{?buildroot:%{buildroot}}%{_infodir} \
300 rm -rf %{?buildroot:%{buildroot}}%{_defaultdocdir} \
301 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc/%{name} \
302 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc/%{name}-%{version} \
303 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/gtk-doc \
304 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc \
305 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/man \
306 find %{?buildroot:%{buildroot}} -regex ".*/man/man./.*\.[0-9]" | xargs rm -f -- \
307 find %{?buildroot:%{buildroot}} -regex ".*/man/../man./.*\.[0-9]" | xargs rm -f -- \
308 find %{?buildroot:%{buildroot}} -regex ".*/man/man./.*\.[0-9]pm" | xargs rm -f --
312 mkdir -p %{buildroot}/%{_unitdir}/%{1} \
313 ln -s ../%{2} %{buildroot}/%{_unitdir}/%{1}/%{2} \
317 %_fontsdir %{_usr}/share/fonts
318 %_ttfontsdir %{_fontsdir}/truetype
319 %_miscfontsdir %{_fontsdir}/misc
320 %_fontsconfdir %{_sysconfdir}/fonts
321 %_fontsconfddir %{_fontsconfdir}/conf.d
322 %_fontsconfavaildir %{_datadir}/%{name}/conf.avail
326 Summary: Development files for package %{name}\
329 This package provides header files and other developer releated files for package %{name}.\
332 %{_libdir}/pkgconfig/*.pc\
336 %devel_desc This package contains all necessary include files and libraries needed \
337 to develop applications that require %{name}.\
340 %posttrans(n:) %%posttrans %{?-n:-n %{-n*}}%{*} \
341 echo "Running %{?-n:%{-n*}}%{!?-n:%{name}%{?1:-%{1}}} %%posttrans script" \
344 %_debug_manifest %{_rpmconfigdir}/debug.manifest
346 %_install_debug_manifest \
347 cp %{_debug_manifest} %{_builddir}/%{?buildsubdir}/%{name}-debuginfo.manifest \
348 cp %{_debug_manifest} %{_builddir}/%{?buildsubdir}/%{name}-debugsource.manifest \
351 %_buildinfo "Tizen %tizen_full_version"\
352 "%_project/%_repository"\
353 "%(gcc --version | head -n 1)-%(rpm -q gcc --queryformat \"%{VCS}\" | sed -e 's/.*\#//')"\