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 AR="%__ar"; export AR ; \
98 NM="%__nm"; export NM ; \
99 RANLIB="%__ranlib"; export RANLIB ; \
100 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
101 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
102 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
103 ./configure --build=%{_build} --host=%{_host} \\\
104 --program-prefix=%{?_program_prefix} \\\
105 --prefix=%{_prefix} \\\
106 --exec-prefix=%{_exec_prefix} \\\
107 --bindir=%{_bindir} \\\
108 --sbindir=%{_sbindir} \\\
109 --sysconfdir=%{_sysconfdir} \\\
110 --datadir=%{_datadir} \\\
111 --includedir=%{_includedir} \\\
112 --libdir=%{_libdir} \\\
113 --libexecdir=%{_libexecdir} \\\
114 --localstatedir=%{_localstatedir} \\\
115 --sharedstatedir=%{_sharedstatedir} \\\
116 --mandir=%{_mandir} \\\
117 --infodir=%{_infodir}
121 AR="%__ar"; export AR ; \
122 NM="%__nm"; export NM ; \
123 RANLIB="%__ranlib"; export RANLIB ; \
124 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
125 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
126 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
127 autoreconf -v --install --force || exit 1 \
128 ./configure --build=%{_build} --host=%{_host} \\\
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 AR="%__ar"; export AR ; \
146 NM="%__nm"; export NM ; \
147 RANLIB="%__ranlib"; export RANLIB ; \
148 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
149 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
150 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
151 ./autogen.sh --build=%{_build} --host=%{_host} \\\
152 --program-prefix=%{?_program_prefix} \\\
153 --prefix=%{_prefix} \\\
154 --exec-prefix=%{_exec_prefix} \\\
155 --bindir=%{_bindir} \\\
156 --sbindir=%{_sbindir} \\\
157 --sysconfdir=%{_sysconfdir} \\\
158 --datadir=%{_datadir} \\\
159 --includedir=%{_includedir} \\\
160 --libdir=%{_libdir} \\\
161 --libexecdir=%{_libexecdir} \\\
162 --localstatedir=%{_localstatedir} \\\
163 --sharedstatedir=%{_sharedstatedir} \\\
164 --mandir=%{_mandir} \\\
165 --infodir=%{_infodir}
170 prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\
171 exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\
172 bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\
173 sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\
174 sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\
175 datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\
176 includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\
177 libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\
178 libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\
179 localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\
180 sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\
181 mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\
182 infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\
188 DESTDIR=%{?buildroot:%{buildroot}} \\\
189 INSTALL_ROOT=%{?buildroot:%{buildroot}} \\\
191 rm -f %{?buildroot:%{buildroot}}%{_infodir}/dir \
192 find %{?buildroot:%{buildroot}} -regex ".*\\.la$" | xargs rm -f -- \
193 %{!?keepstatic:find %{?buildroot:%{buildroot}} -regex ".*\\.a$" | xargs rm -f --}
195 %_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
196 && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
197 [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
199 %lang_package(n:f:) \
200 %package %{-n:-n %{-n*}-}locale \
201 Summary: Translations and Locale for package %{name}\
202 Requires: %{-n:%{-n*}}%{!-n:%{name}} = %{version} \
203 Provides: %{-n:%{-n*}}%{!-n:%{name}}-lang-all = %{version} \
205 %description %{-n:-n %{-n*}-}locale\
206 This package provides translations for package %{name}.\
207 %files %{-n:-n %{-n*}-}locale -f %{-f:%{-f*}.lang} %{!-f:%{name}.lang}\
208 %defattr(-,root,root,-)\
213 Summary: Documentation for package %{name}\
216 This package provides documentation for package %{name}.\
217 %files docs -f documentation.list\
218 %defattr(-,root,root,-)\
223 Summary: ISU Package configuration \
226 This package provides ISU configuration for package %{name}.\
227 %files isu -f isu.list\
228 %defattr(-,root,root,-)\
231 # Bad hack to set $LANG to C during all RPM builds
243 CFLAGS="%optflags" ; export CFLAGS ; \
244 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
245 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
246 LDFLAGS="${LDFLAGS:-%{?global_LDFLAGS}}"; export LDFLAGS ; \
249 %install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\
253 %{?_enable_binutils_strip:export STRIP_DEFAULT_PACKAGE="binutils"} \
255 rm -rf %{?buildroot:%{buildroot}} \
256 mkdir -p %{?buildroot:%{buildroot}} \
261 rm -rf %{?buildroot:%{buildroot}} \
264 %find_lang %{_rpmconfigdir}/find-lang.sh %{buildroot}
265 %find_docs %{_rpmconfigdir}/tizen/find-docs.sh %{buildroot}
269 #==============================================================================
270 # ---- default .desktop directories per the desktop-entry freedesktop.org spec
272 %_desktopdir %{_datadir}/applications
274 #==============================================================================
275 # ---- Generic auto req/prov filtering macros
277 # http://fedoraproject.org/wiki/PackagingDrafts/AutoProvidesAndRequiresFiltering
279 # prevent anything matching from being scanned for provides
280 %filter_provides_in(P) %{expand: \
281 %global __filter_prov_cmd %{?__filter_prov_cmd} %{__grep} -v %{-P} '%*' | \
284 # prevent anything matching from being scanned for requires
285 %filter_requires_in(P) %{expand: \
286 %global __filter_req_cmd %{?__filter_req_cmd} %{__grep} -v %{-P} '%*' | \
289 # filter anything matching out of the provides stream
290 %filter_from_provides() %{expand: \
291 %global __filter_from_prov %{?__filter_from_prov} | %{__sed} -e '%*' \
294 # filter anything matching out of the requires stream
295 %filter_from_requires() %{expand: \
296 %global __filter_from_req %{?__filter_from_req} | %{__sed} -e '%*' \
299 # actually set up the filtering bits
300 %filter_setup %{expand: \
301 %global _use_internal_dependency_generator 0 \
302 %global __deploop() while read FILE; do %{_rpmconfigdir}/rpmdeps -%{1} ${FILE}; done | /bin/sort -u \
303 %global __find_provides /bin/sh -c "%{?__filter_prov_cmd} %{__deploop P} %{?__filter_from_prov}" \
304 %global __find_requires /bin/sh -c "%{?__filter_req_cmd} %{__deploop R} %{?__filter_from_req}" \
308 rm -rf %{?buildroot:%{buildroot}}%{_infodir} \
309 rm -rf %{?buildroot:%{buildroot}}%{_defaultdocdir} \
310 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc/%{name} \
311 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc/%{name}-%{version} \
312 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/gtk-doc \
313 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc \
314 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/man \
315 find %{?buildroot:%{buildroot}} -regex ".*/man/man./.*\.[0-9]" | xargs rm -f -- \
316 find %{?buildroot:%{buildroot}} -regex ".*/man/../man./.*\.[0-9]" | xargs rm -f -- \
317 find %{?buildroot:%{buildroot}} -regex ".*/man/man./.*\.[0-9]pm" | xargs rm -f --
321 mkdir -p %{buildroot}/%{_unitdir}/%{1} \
322 ln -s ../%{2} %{buildroot}/%{_unitdir}/%{1}/%{2} \
326 %_fontsdir %{_usr}/share/fonts
327 %_ttfontsdir %{_fontsdir}/truetype
328 %_miscfontsdir %{_fontsdir}/misc
329 %_fontsconfdir %{_sysconfdir}/fonts
330 %_fontsconfddir %{_fontsconfdir}/conf.d
331 %_fontsconfavaildir %{_datadir}/%{name}/conf.avail
335 Summary: Development files for package %{name}\
338 This package provides header files and other developer releated files for package %{name}.\
341 %{_libdir}/pkgconfig/*.pc\
345 %devel_desc This package contains all necessary include files and libraries needed \
346 to develop applications that require %{name}.\
349 %posttrans(n:) %%posttrans %{?-n:-n %{-n*}}%{*} \
350 echo "Running %{?-n:%{-n*}}%{!?-n:%{name}%{?1:-%{1}}} %%posttrans script" \
353 %_debug_manifest %{_rpmconfigdir}/debug.manifest
355 %_install_debug_manifest \
356 cp %{_debug_manifest} %{_builddir}/%{?buildsubdir}/%{name}-debuginfo.manifest \
357 cp %{_debug_manifest} %{_builddir}/%{?buildsubdir}/%{name}-debugsource.manifest \
360 %_buildinfo "Tizen %tizen_full_version"\
361 "%_project/%_repository"\
362 "%(gcc --version | head -n 1)-%(rpm -q gcc --queryformat \"%{VCS}\" | sed -e 's/.*\#//')"\