4 %_sysconfdir %{_buildPrefix}${sysconfdir}
5 %_localstatedir %{_buildPrefix}${localstatedir}
6 %_defaultdocdir %{_usr}/share/doc/packages
7 %_unitdir_user ${systemd_unitdir}/user
8 %_unitdir ${systemd_unitdir}/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 # this script calls all scripts in /usr/lib/rpm/brp-tizen.d
18 /usr/lib/rpm/brp-compress \
19 /usr/lib/rpm/brp-tizen \
20 %{!?disable_docs_package:/usr/lib/rpm/tizen/find-docs.sh %{buildroot}} \
23 # macro: %configure_kernel_source
26 %configure_kernel_source() \
27 if test -d /usr/src/linux ; then \
28 pushd /usr/src/linux \
29 test -f .config || cp arch/%_arch/defconfig.default .config \
30 yes "" | make oldconfig \
38 NUM_ARGS=${#ALL_ARGS[@]} \
39 if test -x /sbin/install-info ; then \
40 if test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \
41 /sbin/install-info "${ALL_ARGS[@]}" \
45 %install_info_delete(:-:) \
47 NUM_ARGS=${#ALL_ARGS[@]} \
48 if test -x /sbin/install-info ; then \
49 if ! test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \
50 /sbin/install-info --quiet --delete "${ALL_ARGS[@]}" \
54 # find-supplements.ksyms parses this macro directly out of the spec file:
55 %supplements_kernel_module() \
56 %{expand:%(if ! rpm -q kernel-syms > /dev/null; then echo "%fail Please add the kernel-syms package to BuildRequires"; fi)}
59 %cflags_profile_generate -fprofile-generate
60 %cflags_profile_feedback -fprofile-use
67 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
68 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
69 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
70 %{_configure} --build=%{_build} --host=%{_host} \\\
71 --target=%{_target_platform} \\\
72 --program-prefix=%{?_program_prefix} \\\
73 --prefix=%{_prefix} \\\
74 --exec-prefix=%{_exec_prefix} \\\
75 --bindir=%{_bindir} \\\
76 --sbindir=%{_sbindir} \\\
77 --sysconfdir=%{_sysconfdir} \\\
78 --datadir=%{_datadir} \\\
79 --includedir=%{_includedir} \\\
80 --libdir=%{_libdir} \\\
81 --libexecdir=%{_libexecdir} \\\
82 --localstatedir=%{_localstatedir} \\\
83 --sharedstatedir=%{_sharedstatedir} \\\
84 --mandir=%{_mandir} \\\
89 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
90 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
91 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
92 %{_configure} --build=%{_build} --host=%{_host} \\\
93 --target=%{_target_platform} \\\
94 --program-prefix=%{?_program_prefix} \\\
95 --prefix=%{_prefix} \\\
96 --exec-prefix=%{_exec_prefix} \\\
97 --bindir=%{_bindir} \\\
98 --sbindir=%{_sbindir} \\\
99 --sysconfdir=%{_sysconfdir} \\\
100 --datadir=%{_datadir} \\\
101 --includedir=%{_includedir} \\\
102 --libdir=%{_libdir} \\\
103 --libexecdir=%{_libexecdir} \\\
104 --localstatedir=%{_localstatedir} \\\
105 --sharedstatedir=%{_sharedstatedir} \\\
106 --mandir=%{_mandir} \\\
107 --infodir=%{_infodir}
115 DESTDIR=%{?buildroot:%{buildroot}} \\\
116 BINDIR=%{_bindir} \\\
117 prefix=%{_prefix} \\\
118 exec_prefix=%{_exec_prefix} \\\
119 bindir=%{_bindir} \\\
120 sbindir=%{_sbindir} \\\
121 sysconfdir=%{_sysconfdir} \\\
122 datadir=%{_datadir} \\\
123 includedir=%{_includedir} \\\
124 libdir=%{_libdir} \\\
125 libexecdir=%{_libexecdir} \\\
126 localstatedir=}%{_localstatedir} \\\
127 sharedstatedir=%{_sharedstatedir} \\\
128 mandir=%{_mandir} \\\
129 infodir=%{_infodir} \\\
135 DESTDIR=%{?buildroot:%{buildroot}} \\\
136 INSTALL_ROOT=%{?buildroot:%{buildroot}} \\\
137 BINDIR=%{_bindir} \\\
139 rm -f %{?buildroot:%{buildroot}}%{_infodir}/dir \
140 find %{?buildroot:%{buildroot}} -regex ".*\\.la$" | xargs rm -f -- \
141 %{!?keepstatic:find %{?buildroot:%{buildroot}} -regex ".*\\.a$" | xargs rm -f --}
143 %_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
144 && RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
145 [ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
147 %lang_package(n:f:) \
148 %package %{-n:-n %{-n*}-}locale \
149 Summary: Translations and Locale for package %{name}\
150 Group: System/Localization\
151 Requires: %{-n:%{-n*}}%{!-n:%{name}} = %{version} \
152 Provides: %{-n:%{-n*}}%{!-n:%{name}}-lang-all = %{version} \
154 %description %{-n:-n %{-n*}-}locale\
155 This package provides translations for package %{name}.\
156 %files %{-n:-n %{-n*}-}locale -f %{-f:%{-f*}.lang} %{!-f:%{name}.lang}\
157 %defattr(-,root,root,-)\
162 Summary: Documentation for package %{name}\
163 Group: Documentation\
166 This package provides documentation for package %{name}.\
167 %files docs -f documentation.list\
168 %defattr(-,root,root,-)\
171 # Bad hack to set $LANG to C during all RPM builds
183 CFLAGS="%optflags" ; export CFLAGS ;\
184 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ;\
185 FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ;\
186 LD_AS_NEEDED=1; export LD_AS_NEEDED ;\
189 %install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\
194 rm -rf %{?buildroot:%{buildroot}}\
195 mkdir -p %{?buildroot:%{buildroot}}\
200 rm -rf %{?buildroot:%{buildroot}}\
203 %find_lang %{_rpmconfigdir}/lib/find-lang.sh \${D}%{_buildPrefix}
204 %find_docs %{_rpmconfigdir}/lib/tizen/find-docs.sh %{buildroot}
208 #==============================================================================
209 # ---- default .desktop directories per the desktop-entry freedesktop.org spec
211 %_desktopdir %{_datadir}/applications
213 #==============================================================================
214 # ---- Generic auto req/prov filtering macros
216 # http://fedoraproject.org/wiki/PackagingDrafts/AutoProvidesAndRequiresFiltering
218 # prevent anything matching from being scanned for provides
219 %filter_provides_in(P) %{expand: \
220 %global __filter_prov_cmd %{?__filter_prov_cmd} %{__grep} -v %{-P} '%*' | \
223 # prevent anything matching from being scanned for requires
224 %filter_requires_in(P) %{expand: \
225 %global __filter_req_cmd %{?__filter_req_cmd} %{__grep} -v %{-P} '%*' | \
228 # filter anything matching out of the provides stream
229 %filter_from_provides() %{expand: \
230 %global __filter_from_prov %{?__filter_from_prov} | %{__sed} -e '%*' \
233 # filter anything matching out of the requires stream
234 %filter_from_requires() %{expand: \
235 %global __filter_from_req %{?__filter_from_req} | %{__sed} -e '%*' \
238 # actually set up the filtering bits
239 %filter_setup %{expand: \
240 %global _use_internal_dependency_generator 0 \
241 %global __deploop() while read FILE; do /usr/lib/rpm/rpmdeps -%{1} ${FILE}; done | /bin/sort -u \
242 %global __find_provides /bin/sh -c "%{?__filter_prov_cmd} %{__deploop P} %{?__filter_from_prov}" \
243 %global __find_requires /bin/sh -c "%{?__filter_req_cmd} %{__deploop R} %{?__filter_from_req}" \
247 rm -rf %{?buildroot:%{buildroot}}%{_infodir} \
248 rm -rf %{?buildroot:%{buildroot}}%{_defaultdocdir} \
249 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc/%{name} \
250 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc/%{name}-%{version} \
251 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/gtk-doc \
252 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/doc \
253 rm -rf %{?buildroot:%{buildroot}}%{_datadir}/man \
254 find %{?buildroot:%{buildroot}} -regex ".*/man/man./.*\.[0-9]" | xargs rm -f -- \
255 find %{?buildroot:%{buildroot}} -regex ".*/man/../man./.*\.[0-9]" | xargs rm -f -- \
256 find %{?buildroot:%{buildroot}} -regex ".*/man/man./.*\.[0-9]pm" | xargs rm -f --
260 mkdir -p %{buildroot}/%{_unitdir}/%{1} \
261 ln -s ../%{2} %{buildroot}/%{_unitdir}/%{1}/%{2} \
265 %_fontsdir %{_usr}/share/fonts
266 %_ttfontsdir %{_fontsdir}/truetype
267 %_miscfontsdir %{_fontsdir}/misc
268 %_fontsconfdir %{_sysconfdir}/fonts
269 %_fontsconfddir %{_fontsconfdir}/conf.d
270 %_fontsconfavaildir %{_datadir}/%{name}/conf.avail
274 Summary: Development files for package %{name}\
277 This package provides header files and other developer releated files for package %{name}.\
280 %{_libdir}/pkgconfig/*.pc\
284 %devel_desc This package contains all necessary include files and libraries needed \
285 to develop applications that require %{name}.\