1 DESCRIPTION = "The Package Manager"
2 HOMEPAGE = "http://www.rpm.org"
3 SECTION = "Base/Package Management"
10 inherit autotools-brokensep
15 #PROVIDES by rpm-security-plugin
18 #PROVIDES by python-rpm
21 #PROVIDES by rpm-build
22 # the PROVIDES rules is ignore "rpmbuild "
23 PROVIDES += "rpmbuild"
24 RPROVIDES_rpm-build += "rpmbuild"
25 # the PROVIDES rules is ignore "rpm:${prefix}/bin/rpmbuild "
26 PROVIDES += "rpm:${prefix}/bin/rpmbuild"
27 RPROVIDES_rpm-build += "rpm:${prefix}/bin/rpmbuild"
30 #PROVIDES by rpm-locale
31 # the PROVIDES rules is ignore "rpm-lang-all = 4.11.0.1"
32 PROVIDES += "rpm-lang-all"
33 RPROVIDES_rpm-locale += "rpm-lang-all"
40 # the PROVIDES rules is ignore "rpminst "
42 RPROVIDES_rpm += "rpminst"
43 # the PROVIDES rules is ignore "rpm-libs "
44 PROVIDES += "rpm-libs"
45 RPROVIDES_rpm += "rpm-libs"
52 #RDEPENDS of rpm-security-plugin (${PN}-security-plugin)
53 RDEPENDS_${PN}-security-plugin += "smack"
54 RDEPENDS_${PN}-security-plugin += "nss"
55 RDEPENDS_${PN}-security-plugin += "rpm"
57 #RDEPENDS of python-rpm (python-${PN})
58 RDEPENDS_python-${PN} += "rpm"
60 #RDEPENDS of rpm-build (${PN}-build)
61 RDEPENDS_${PN}-build += "bzip2"
62 RDEPENDS_${PN}-build += "make"
63 RDEPENDS_${PN}-build += "gcc"
64 RDEPENDS_${PN}-build += "patch"
65 RDEPENDS_${PN}-build += "xz"
66 RDEPENDS_${PN}-build += "eglibc"
67 RDEPENDS_${PN}-build += "findutils"
68 RDEPENDS_${PN}-build += "gzip"
69 RDEPENDS_${PN}-build += "rpm"
70 RDEPENDS_${PN}-build += "binutils"
72 #RDEPENDS of rpm-locale (${PN}-locale )
73 RDEPENDS_${PN}-locale += "rpm"
75 #RDEPENDS of rpm-dev (${PN}-dev)
76 RDEPENDS_${PN}-dev += "rpm"
77 RDEPENDS_${PN}-dev += "popt"
81 #DEPENDS of python-rpm
85 DEPENDS += "findutils"
90 DEPENDS_append_class-native = " gcc"
91 DEPENDS_append_class-target = " gcc-cross"
100 DEPENDS_append_class-native = " libtool"
101 DEPENDS_append_class-target = " libtool-cross"
102 #Replace "DEPENDS" on gettext by "inherit gettext"
108 DEPENDS_append_class-native = " fdupes-native"
109 DEPENDS_append_class-target = " fdupes-native"
111 DEPENDS += "binutils"
115 chmod -Rf a+rX,u+w,g-w,o-w ${S}
116 #setup -q -n rpm-4.11.0.1
117 cp ${S}/packaging/rpm.manifest .
119 tar xjf ${S}/packaging/db-4.8.30.tar.bz2
122 # will get linked from db3
124 patch -p0 < ${S}/packaging/db-4.8.30-integration.dif
125 if [ -s ${sysconfdir}/rpm/tizen_macros ]; then
126 cp -a ${sysconfdir}/rpm/tizen_macros ${S}/packaging/rpm-tizen_macros
128 cp -a ${S}/packaging/rpm-tizen_macros tizen_macros
135 bb.build.exec_func('do_prep', d)
146 CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ;
147 CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ;
148 FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ;
149 LD_AS_NEEDED=1; export LD_AS_NEEDED ;
151 CPPFLAGS="$CPPFLAGS `pkg-config --cflags nss`"
153 export CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -ffunction-sections"
154 export LDFLAGS="${LDFLAGS} -Wl,-Bsymbolic-functions -ffunction-sections"
156 BUILDTARGET="--host=x86_64-linux-gnu "
157 BUILDTARGET+="--build=x86_64-tizen-linux "
160 CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ;
161 CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ;
162 FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ;
163 autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \
164 --target=x86_64-tizen-linux \
167 --exec-prefix=${prefix} \
168 --bindir=${prefix}/bin \
169 --sbindir=${prefix}/sbin \
170 --sysconfdir=${sysconfdir} \
171 --datadir=${prefix}/share \
172 --includedir=${prefix}/include \
173 --libdir=${prefix}/lib \
174 --libexecdir=${prefix}/libexec \
175 --localstatedir=${localstatedir} \
176 --sharedstatedir=${prefix}/com \
178 --infodir=${infodir} \
179 --disable-dependency-tracking \
195 echo export RPM_BUILD_ROOT=${D}
203 mkdir -p ${D}${prefix}/lib
204 mkdir -p ${D}${prefix}/share/locale
205 ln -s ../share/locale ${D}${prefix}/lib/locale
210 BINDIR=${prefix}/bin \
212 rm -f ${D}${infodir}/dir
213 find ${D} -regex ".*\.la$" | xargs rm -f --
214 find ${D} -regex ".*\.a$" | xargs rm -f --
215 install -m 644 db3/db.h ${D}${prefix}/include/rpm
216 mkdir -p ${D}${sysconfdir}/rpm
217 cp -a tizen_macros ${D}${prefix}/lib/rpm
218 mkdir -p ${D}${prefix}/lib/rpm/tizen
219 install -m 755 ${S}/packaging/find-docs.sh ${D}${prefix}/lib/rpm/tizen
220 install -m 755 ${S}/packaging/find-provides.ksyms ${D}${prefix}/lib/rpm
221 install -m 644 ${S}/packaging/device-sec-policy ${D}${sysconfdir}/device-sec-policy
222 install -m 644 ${S}/packaging/device-sec-policy ${D}${prefix}/lib/rpm-plugins/msm-device-sec-policy
223 ln -s ../tizen_macros ${D}${prefix}/lib/rpm/tizen/macros
224 for d in BUILD RPMS SOURCES SPECS SRPMS BUILDROOT ; do
225 mkdir -p ${D}${prefix}/src/packages/$d
226 chmod 755 ${D}${prefix}/src/packages/$d
228 for d in ${D}${prefix}/lib/rpm/platform/*-linux/macros ; do
229 dd=${d%-linux/macros}
231 mkdir -p ${D}${prefix}/src/packages/RPMS/$dd
232 chmod 755 ${D}${prefix}/src/packages/RPMS/$dd
234 mkdir -p ${D}${localstatedir}/lib/rpm
235 gzip -9 ${D}${mandir}/man[18]/*.[18]
236 export RPM_BUILD_ROOT
238 rm -rf doc/manual/Makefile*
239 rm -f ${D}${prefix}/lib/rpmpopt
240 rm -rf ${D}${mandir}/{fr,ja,ko,pl,ru,sk}
241 rm -f ${D}${prefix}/share/locale/de/LC_MESSAGES/rpm.mo
242 rm -f ${D}${prefix}/lib/rpm/cpanflute ${D}${prefix}/lib/rpm/cpanflute2
243 install -m 755 scripts/find-supplements{,.ksyms} ${D}${prefix}/lib/rpm
244 install -m 755 scripts/firmware.prov ${D}${prefix}/lib/rpm
245 install -m 755 scripts/debuginfo.prov ${D}${prefix}/lib/rpm
246 rm -f ${D}${prefix}/lib/locale ${D}${prefix}/lib/rpmrc
247 mkdir -p ${D}${sysconfdir}/rpm
248 chmod 755 ${D}${sysconfdir}/rpm
249 mkdir -p ${D}${prefix}/lib/rpm/macros.d
250 # remove some nonsense or non-working scripts
251 pushd ${D}${prefix}/lib/rpm/
252 for f in rpm2cpio.sh rpm.daily rpmdiff* rpm.log rpm.xinetd freshen.sh u_pkg.sh \
253 magic magic.mgc magic.mime* rpmfile *.pl javadeps brp-redhat \
254 brp-strip-static-archive vpkg-provides*.sh http.req sql.req tcl.req \
255 rpmdb_* brp-sparc64-linux brp-strip-comment-note brp-java-gcjcompile
259 for i in ${prefix}/share/automake-*/*; do
260 if test -f "$i" && test -f "${i##*/}"; then
265 rm -f ${D}${prefix}/lib/*.la
266 rm -f ${D}${prefix}/lib/rpm-plugins/*.la
272 fdupes -q -n -r ${D}${prefix}/lib/rpm/platform |
274 if test -z "$_target" ; then
277 if test -z "$_file" ; then
281 if test "$_symlinks" = 1; then
282 ln -sf "${_target#${D}}" "$_file";
284 ln -f "$_target" "$_file";
289 sh ${D}${prefix}/lib/rpm/find-lang.sh ${D} rpm
295 PACKAGES += " rpm-security-plugin "
296 PACKAGES += " python-rpm "
297 PACKAGES += " rpm-build "
298 PACKAGES += " rpm-docs "
300 rpm-security-plugin_files = ""
301 rpm-security-plugin_files += "rpm.manifest"
302 rpm-security-plugin_files += "${prefix}/lib/rpm-plugins/msm.so"
303 rpm-security-plugin_files += "${prefix}/lib/rpm-plugins/msm-device-sec-policy"
304 rpm-security-plugin_files += "${sysconfdir}/device-sec-policy"
306 python-rpm_files = ""
307 python-rpm_files += "${prefix}/lib/python*/site-packages/rpm"
308 python-rpm_files += "${prefix}/lib/python*/site-packages/rpm/transaction.py"
311 rpm-build_files += "rpm.manifest"
312 rpm-build_files += "${prefix}/bin/rpmbuild"
313 rpm-build_files += "${prefix}/bin/gendiff"
314 rpm-build_files += "${prefix}/bin/rpmspec"
315 rpm-build_files += "${prefix}/bin/rpmsign"
316 rpm-build_files += "${prefix}/lib/rpm/tizen/find-*"
317 rpm-build_files += "${prefix}/lib/rpm/brp-*"
318 rpm-build_files += "${prefix}/lib/rpm/find-supplements*"
319 rpm-build_files += "${prefix}/lib/rpm/check-*"
320 rpm-build_files += "${prefix}/lib/rpm/debugedit"
321 rpm-build_files += "${prefix}/lib/rpm/find-debuginfo.sh"
322 rpm-build_files += "${prefix}/lib/rpm/find-lang.sh"
323 rpm-build_files += "${prefix}/lib/rpm/find-provides.ksyms"
324 rpm-build_files += "${prefix}/lib/rpm/*provides*"
325 rpm-build_files += "${prefix}/lib/rpm/*requires*"
326 rpm-build_files += "${prefix}/lib/rpm/*deps*"
327 rpm-build_files += "${prefix}/lib/rpm/*.prov"
328 rpm-build_files += "${prefix}/lib/rpm/*.req"
329 rpm-build_files += "${prefix}/lib/rpm/macros.*"
330 rpm-build_files += "${prefix}/lib/rpm/fileattrs"
333 rpm-dev_files += "rpm.manifest"
334 rpm-dev_files += "${prefix}/bin/rpmgraph"
335 rpm-dev_files += "${prefix}/include/rpm"
336 rpm-dev_files += "${prefix}/lib/librpm.so"
337 rpm-dev_files += "${prefix}/lib/librpmbuild.so"
338 rpm-dev_files += "${prefix}/lib/librpmio.so"
339 rpm-dev_files += "${prefix}/lib/librpmsign.so"
340 rpm-dev_files += "${prefix}/lib/pkgconfig/rpm.pc"
342 rpm-locale_files = ""
345 rpm-docs_files += "GROUPS"
348 rpm_files += "rpm.manifest"
349 rpm_files += "${sysconfdir}/rpm"
350 rpm_files += "/bin/rpm"
351 rpm_files += "${prefix}/bin/rpm2cpio"
352 rpm_files += "${prefix}/bin/rpmdb"
353 rpm_files += "${prefix}/bin/rpmkeys"
354 rpm_files += "${prefix}/bin/rpmquery"
355 rpm_files += "${prefix}/bin/rpmverify"
356 rpm_files += "${prefix}/bin/rpmqpack"
357 rpm_files += "%dir ${prefix}/lib/rpm"
358 rpm_files += "${prefix}/lib/rpm/macros"
359 rpm_files += "${prefix}/lib/rpm/macros.d"
360 rpm_files += "${prefix}/lib/rpm/rpmpopt*"
361 rpm_files += "${prefix}/lib/rpm/rpmrc"
362 rpm_files += "${prefix}/lib/rpm/tizen/macros"
363 rpm_files += "${prefix}/lib/rpm/tizen_macros"
364 rpm_files += "${prefix}/lib/rpm/rpm.supp"
365 rpm_files += "${prefix}/lib/rpm/tgpg"
366 rpm_files += "${prefix}/lib/rpm/platform"
367 rpm_files += "${prefix}/lib/rpm-plugins"
368 rpm_files += "${prefix}/lib/rpm-plugins/exec.so"
369 rpm_files += "${prefix}/lib/librpm.so.*"
370 rpm_files += "${prefix}/lib/librpmio.so.*"
371 rpm_files += "${prefix}/lib/librpmbuild.so.*"
372 rpm_files += "${prefix}/lib/librpmsign.so.*"
373 rpm_files += "${localstatedir}/lib/rpm"
374 rpm_files += "%attr(755,root,root) ${prefix}/src/packages/BUILD"
375 rpm_files += "%attr(755,root,root) ${prefix}/src/packages/SPECS"
376 rpm_files += "%attr(755,root,root) ${prefix}/src/packages/SOURCES"
377 rpm_files += "%attr(755,root,root) ${prefix}/src/packages/SRPMS"
378 rpm_files += "%attr(755,root,root) ${prefix}/src/packages/RPMS"
379 rpm_files += "%attr(755,root,root) ${prefix}/src/packages/BUILDROOT"
380 rpm_files += "%attr(755,root,root) ${prefix}/src/packages/RPMS/*"
382 FILES_${PN}-security-plugin = "${rpm-security-plugin_files}"
383 FILES_python-${PN} = "${python-rpm_files}"
384 FILES_${PN}-build = "${rpm-build_files}"
385 FILES_${PN}-dev = "${rpm-dev_files}"
386 FILES_${PN}-locale = "${rpm-locale_files}"
387 FILES_${PN}-docs = "${rpm-docs_files}"
388 FILES_${PN} = "${rpm_files}"
390 PKG_rpm-security-plugin= "rpm-security-plugin"
391 PKG_python-rpm= "python-rpm"
392 PKG_rpm-build= "rpm-build"
393 PKG_rpm-dev= "rpm-dev"
394 PKG_rpm-locale= "rpm-locale"
395 PKG_rpm-docs= "rpm-docs"
398 require rpm-extraconf.inc