2 %_infodir %{_prefix}/share/info
3 %_mandir %{_prefix}/share/man
6 %_defaultdocdir %{_usr}/share/doc/packages
7 %_unitdir_user /usr/lib/systemd/user
8 %_unitdir /usr/lib/systemd/system
10 # package build macros
11 # %make_install make install DESTDIR=%{?buildroot}
12 # %makeinstall make DESTDIR=%{?buildroot:%{buildroot}} install
13 %rb_arch %(echo %{_host_cpu}-linux | sed -e "s/i686/i586/" -e "s/armv5tel/armv4l/" -e "s/hppa2.0/hppa/")
14 %rb_ver %(/usr/bin/ruby -e 'puts VERSION.sub(/\\\.\\\d$/, "")')
16 # external kernel module helper macro(s)
17 %kernel_devel_uname_r %(/bin/rpm -q --provides $(/bin/rpm -q --whatprovides kernel-devel-uname-r) | sed -ne 's,kernel-devel-uname-r = ,, p')
18 %kernel_release %(/bin/rpm -q --queryformat '%{RPMTAG_VERSION}-%{RPMTAG_RELEASE}' $(/bin/rpm -q --whatprovides kernel))
19 %kernel_name %(/bin/rpm -q --queryformat '%{RPMTAG_NAME}' $(/bin/rpm -q --whatprovides kernel))
21 # this script calls all scripts in /usr/lib/rpm/brp-tizen.d
23 /usr/lib/rpm/brp-compress \
24 /usr/lib/rpm/brp-tizen \
25 %{!?disable_docs_package:/usr/lib/rpm/tizen/find-docs.sh %{buildroot}} \
28 # macro: %configure_kernel_source
31 %configure_kernel_source() \
32 if test -d /usr/src/linux ; then \
33 pushd /usr/src/linux \
34 test -f .config || cp arch/%_arch/defconfig.default .config \
35 yes "" | make oldconfig \
43 NUM_ARGS=${#ALL_ARGS[@]} \
44 if test -x /sbin/install-info ; then \
45 if test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \
46 /sbin/install-info "${ALL_ARGS[@]}" \
50 %install_info_delete(:-:) \
52 NUM_ARGS=${#ALL_ARGS[@]} \
53 if test -x /sbin/install-info ; then \
54 if ! test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \
55 /sbin/install-info --quiet --delete "${ALL_ARGS[@]}" \
59 # find-supplements.ksyms parses this macro directly out of the spec file:
60 %supplements_kernel_module() \
61 %{expand:%(if ! rpm -q kernel-syms > /dev/null; then echo "%fail Please add the kernel-syms package to BuildRequires"; fi)}
64 %cflags_profile_generate -fprofile-generate
65 %cflags_profile_feedback -fprofile-use
72 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
73 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
74 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
75 ./configure --build=%{_build} --host=%{_host} \\\
76 --program-prefix=%{?_program_prefix} \\\
77 --prefix=%{_prefix} \\\
78 --exec-prefix=%{_exec_prefix} \\\
79 --bindir=%{_bindir} \\\
80 --sbindir=%{_sbindir} \\\
81 --sysconfdir=%{_sysconfdir} \\\
82 --datadir=%{_datadir} \\\
83 --includedir=%{_includedir} \\\
84 --libdir=%{_libdir} \\\
85 --libexecdir=%{_libexecdir} \\\
86 --localstatedir=%{_localstatedir} \\\
87 --sharedstatedir=%{_sharedstatedir} \\\
88 --mandir=%{_mandir} \\\
93 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
94 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
95 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
96 autoreconf -v --install --force || exit 1 \
97 ./configure --build=%{_build} --host=%{_host} \\\
98 --program-prefix=%{?_program_prefix} \\\
99 --prefix=%{_prefix} \\\
100 --exec-prefix=%{_exec_prefix} \\\
101 --bindir=%{_bindir} \\\
102 --sbindir=%{_sbindir} \\\
103 --sysconfdir=%{_sysconfdir} \\\
104 --datadir=%{_datadir} \\\
105 --includedir=%{_includedir} \\\
106 --libdir=%{_libdir} \\\
107 --libexecdir=%{_libexecdir} \\\
108 --localstatedir=%{_localstatedir} \\\
109 --sharedstatedir=%{_sharedstatedir} \\\
110 --mandir=%{_mandir} \\\
111 --infodir=%{_infodir}
114 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
115 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
116 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
117 ./autogen.sh --build=%{_build} --host=%{_host} \\\
118 --program-prefix=%{?_program_prefix} \\\
119 --prefix=%{_prefix} \\\
120 --exec-prefix=%{_exec_prefix} \\\
121 --bindir=%{_bindir} \\\
122 --sbindir=%{_sbindir} \\\
123 --sysconfdir=%{_sysconfdir} \\\
124 --datadir=%{_datadir} \\\
125 --includedir=%{_includedir} \\\
126 --libdir=%{_libdir} \\\
127 --libexecdir=%{_libexecdir} \\\
128 --localstatedir=%{_localstatedir} \\\
129 --sharedstatedir=%{_sharedstatedir} \\\
130 --mandir=%{_mandir} \\\
131 --infodir=%{_infodir}
136 prefix=%{?buildroot:%{buildroot}}%{_prefix} \\\
137 exec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\
138 bindir=%{?buildroot:%{buildroot}}%{_bindir} \\\
139 sbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\
140 sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\
141 datadir=%{?buildroot:%{buildroot}}%{_datadir} \\\
142 includedir=%{?buildroot:%{buildroot}}%{_includedir} \\\
143 libdir=%{?buildroot:%{buildroot}}%{_libdir} \\\
144 libexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\
145 localstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\
146 sharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\
147 mandir=%{?buildroot:%{buildroot}}%{_mandir} \\\
148 infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\
154 DESTDIR=%{?buildroot:%{buildroot}} \\\
155 INSTALL_ROOT=%{?buildroot:%{buildroot}} \\\
157 rm -f %{?buildroot:%{buildroot}}%{_infodir}/dir \
158 find %{?buildroot:%{buildroot}} -regex ".*\\.la$" | xargs rm -f -- \
159 %{!?keepstatic:find %{?buildroot:%{buildroot}} -regex ".*\\.a$" | xargs rm -f --}
161 %_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
162 && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
163 [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
165 %lang_package(n:f:) \
166 %package %{-n:-n %{-n*}-}locale \
167 Summary: Translations and Locale for package %{name}\
168 Group: System/Localization\
169 Requires: %{-n:%{-n*}}%{!-n:%{name}} = %{version} \
170 Provides: %{-n:%{-n*}}%{!-n:%{name}}-lang-all = %{version} \
172 %description %{-n:-n %{-n*}-}locale\
173 This package provides translations for package %{name}.\
174 %files %{-n:-n %{-n*}-}locale -f %{-f:%{-f*}.lang} %{!-f:%{name}.lang}\
175 %defattr(-,root,root,-)\
180 Summary: Documentation for package %{name}\
183 This package provides documentation for package %{name}.\
184 %files docs -f documentation.list\
185 %defattr(-,root,root,-)\
188 # Bad hack to set $LANG to C during all RPM builds
200 CFLAGS="%optflags" ; export CFLAGS ; \
201 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
202 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
203 LD_AS_NEEDED=1; export LD_AS_NEEDED ; \
206 %install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\
211 rm -rf %{?buildroot:%{buildroot}} \
212 mkdir -p %{?buildroot:%{buildroot}} \
217 rm -rf %{?buildroot:%{buildroot}} \
220 %find_lang /usr/lib/rpm/find-lang.sh %{buildroot}
221 %find_docs /usr/lib/rpm/tizen/find-docs.sh %{buildroot}
225 #==============================================================================
226 # ---- default .desktop directories per the desktop-entry freedesktop.org spec
228 %_desktopdir %{_datadir}/applications
230 #==============================================================================
231 # ---- Generic auto req/prov filtering macros
233 # http://fedoraproject.org/wiki/PackagingDrafts/AutoProvidesAndRequiresFiltering
235 # prevent anything matching from being scanned for provides
236 %filter_provides_in(P) %{expand: \
237 %global __filter_prov_cmd %{?__filter_prov_cmd} %{__grep} -v %{-P} '%*' | \
240 # prevent anything matching from being scanned for requires
241 %filter_requires_in(P) %{expand: \
242 %global __filter_req_cmd %{?__filter_req_cmd} %{__grep} -v %{-P} '%*' | \
245 # filter anything matching out of the provides stream
246 %filter_from_provides() %{expand: \
247 %global __filter_from_prov %{?__filter_from_prov} | %{__sed} -e '%*' \
250 # filter anything matching out of the requires stream
251 %filter_from_requires() %{expand: \
252 %global __filter_from_req %{?__filter_from_req} | %{__sed} -e '%*' \
255 # actually set up the filtering bits
256 %filter_setup %{expand: \
257 %global _use_internal_dependency_generator 0 \
258 %global __deploop() while read FILE; do /usr/lib/rpm/rpmdeps -%{1} ${FILE}; done | /bin/sort -u \
259 %global __find_provides /bin/sh -c "%{?__filter_prov_cmd} %{__deploop P} %{?__filter_from_prov}" \
260 %global __find_requires /bin/sh -c "%{?__filter_req_cmd} %{__deploop R} %{?__filter_from_req}" \
264 rm -rf %{?buildroot:%{buildroot}}%{_infodir} \
265 rm -rf %{?buildroot:%{buildroot}}%{_defaultdocdir} \
266 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc/%{name} \
267 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc/%{name}-%{version} \
268 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/gtk-doc \
269 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc \
270 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/man \
271 find %{?buildroot:%{buildroot}} -regex ".*/man/man./.*\.[0-9]" | xargs rm -f -- \
272 find %{?buildroot:%{buildroot}} -regex ".*/man/../man./.*\.[0-9]" | xargs rm -f -- \
273 find %{?buildroot:%{buildroot}} -regex ".*/man/man./.*\.[0-9]pm" | xargs rm -f --
277 mkdir -p %{buildroot}/%{_unitdir}/%{1} \
278 ln -s ../%{2} %{buildroot}/%{_unitdir}/%{1}/%{2} \
282 %_fontsdir %{_usr}/share/fonts
283 %_ttfontsdir %{_fontsdir}/truetype
284 %_miscfontsdir %{_fontsdir}/misc
285 %_fontsconfdir %{_sysconfdir}/fonts
286 %_fontsconfddir %{_fontsconfdir}/conf.d
287 %_fontsconfavaildir %{_datadir}/%{name}/conf.avail
291 Summary: Development files for package %{name}\
294 This package provides header files and other developer releated files for package %{name}.\
297 %{_libdir}/pkgconfig/*.pc\
301 %devel_desc This package contains all necessary include files and libraries needed \
302 to develop applications that require %{name}.\