blob: 1f9a4bd9771f3e3189be30949276d78e9adaf429 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "The RPM package management system"
2DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \
3package management system capable of installing, uninstalling, \
4verifying, querying, and updating software packages. Each software \
5package consists of an archive of files along with information about \
6the package like its version, a description, etc."
7
8RECIPE_NO_UPDATE_REASON = "5.4.15 has a package database issue: http://lists.openembedded.org/pipermail/openembedded-core/2015-August/109187.html"
9
10SUMMARY_${PN}-libs = "Libraries for manipulating RPM packages"
11DESCRIPTION_${PN}-libs = "This package contains the RPM shared libraries."
12
13SUMMARY_${PN}-dev = "Development files for manipulating RPM packages"
14DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \
15development files will simplify the process of writing programs that \
16manipulate RPM packages and databases. These files are intended to \
17simplify the process of creating graphical package managers or any \
18other tools that need an intimate knowledge of RPM packages in order \
19to function."
20
21SUMMARY_${PN}-common = "Common RPM paths, scripts, documentation and configuration"
22DESCRIPTION_${PN}-common = "The rpm-common package contains paths, scripts, documentation \
23and configuration common between RPM Package Manager."
24
25SUMMARY_${PN}-build = "Scripts and executable programs used to build packages"
26DESCRIPTION_${PN}-build = "The rpm-build packagec ontains the scripts and executable programs \
27that are used to build packages using the RPM Package Manager."
28
29SUMMARY_python-rpm = "Python bindings for apps which will manupulate RPM packages"
30DESCRIPTION_python-rpm = "The rpm-python package contains a module that permits applications \
31written in the Python programming language to use the interface \
32supplied by the RPM Package Manager libraries."
33
34SUMMARY_perl-module-rpm = "Perl bindings for apps which will manipulate RPM packages"
35DESCRIPTION_perl-modules-rpm = "The perl-modules-rpm package contains a module that permits applications \
36written in the Perl programming language to use the interface \
37supplied by the RPM Package Manager libraries."
38
39HOMEPAGE = "http://rpm5.org/"
40LICENSE = "LGPLv2.1"
41LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
42
43DEPENDS = "libpcre attr acl popt ossp-uuid file byacc-native"
44
45# rpm2cpio is a shell script, which is part of the rpm src.rpm. It is needed
46# in order to extract the distribution SRPM into a format we can extract...
47SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.14-0.20131024.src.rpm;extract=rpm-5.4.14.tar.gz \
48 file://rpm-log-auto-rm.patch \
49 file://rpm-db-reduce.patch \
50 file://perfile_rpmdeps.sh \
51 file://rpm-autogen.patch \
52 file://rpm-libsql-fix.patch \
53 file://header-include-fix.patch \
54 file://rpm-platform.patch \
55 file://rpm-showrc.patch \
56 file://rpm-tools-mtree-LDFLAGS.patch \
57 file://rpm-fileclass.patch \
58 file://rpm-canonarch.patch \
59 file://rpm-no-loopmsg.patch \
60 file://rpm-scriptletexechelper.patch \
61 file://pythondeps.sh \
62 file://rpmdeps-oecore.patch \
63 file://rpm-resolvedep.patch \
64 file://rpm-no-perl-urpm.patch \
65 file://rpm-macros.patch \
66 file://rpm-lua.patch \
67 file://rpm-ossp-uuid.patch \
68 file://rpm-packageorigin.patch \
69 file://rpm-pkgconfigdeps.patch \
70 file://uclibc-support.patch \
71 file://rpmatch.patch \
72 file://fstack-protector-configure-check.patch \
73 file://dbconvert.patch \
74 file://rpm-uuid-include.patch \
75 file://makefile-am-exec-hook.patch \
76 file://rpm-db_buffer_small.patch \
77 file://rpm-py-init.patch \
78 file://python-rpm-rpmsense.patch \
79 file://rpm-reloc-macros.patch \
80 file://rpm-platform2.patch \
81 file://rpm-remove-sykcparse-decl.patch \
82 file://debugedit-segv.patch \
83 file://debugedit-valid-file-to-fix-segment-fault.patch \
84 file://rpm-platform-file-fix.patch \
85 file://rpm-lsb-compatibility.patch \
86 file://rpm-tag-generate-endian-conversion-fix.patch \
87 file://verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch \
88 file://rpm-hardlink-segfault-fix.patch \
89 file://rpm-payload-use-hashed-inode.patch \
90 file://rpm-fix-logio-cp.patch \
91 file://rpm-db5-or-db6.patch \
92 file://rpm-disable-Wno-override-init.patch \
93 file://rpmqv_cc_b_gone.patch \
94 file://rpm-realpath.patch \
95 file://0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch \
96 file://no-ldflags-in-pkgconfig.patch \
97 file://rpm-lua-fix-print.patch \
98 file://rpm-check-rootpath-reasonableness.patch \
99 file://rpm-macros.in-disable-external-key-server.patch \
100 file://rpm-opendb-before-verifyscript-to-avoid-null-point.patch \
101 "
102
103# Uncomment the following line to enable platform score debugging
104# This is useful when identifying issues with Smart being unable
105# to process certain package feeds.
106#SRC_URI += "file://rpm-debug-platform.patch"
107
108SRC_URI[md5sum] = "25093d399a0b5d1342d24900a91b347d"
109SRC_URI[sha256sum] = "676e3ab41f72e3b504e04109cfb565a300742f56a7da084f202013b30eeae467"
110
111inherit autotools gettext
112
113acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
114
115# Specify the default rpm macros in terms of adjustable variables
116rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros"
117rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros"
118rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros"
119
120# sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux
121
122# Note: perl and sqlite w/o db specified does not currently work.
123# tcl, augeas, nss, gcrypt, xar and keyutils support is untested.
124PACKAGECONFIG ??= "db bzip2 zlib beecrypt openssl libelf python"
125
126PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2,"
127PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz,"
128PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib,"
129PACKAGECONFIG[xar] = "--with-xar,--without-xar,xar,"
130
131WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \
132 --with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \
133 --with-python-lib-dir=${libdir}/python${PYTHON_BASEVERSION}/site-packages \
134 --without-pythonembed"
135PACKAGECONFIG[python] = "${WITH_PYTHON},--without-python,python,"
136
137# Perl modules are not built, but they could be enabled fairly easily
138# the perl module creation and installation would need to be patched.
139# (currently has host perl contamination issues)
140WITH_PERL = "--with-perl --without-perlembed --without-perl-urpm"
141WITHOUT_PERL = "--without-perl --without-perl-urpm"
142PACKAGECONFIG[perl] = "${WITH_PERL},${WITHOUT_PERL},perl,"
143
144# The --with-dbsql will only tell RPM to check for support, db
145# may or may not be built w/ the dbsql support.
146WITH_DB = "--with-db --with-dbsql --without-db-tools-integrated"
147PACKAGECONFIG[db] = "${WITH_DB},--without-db,db,"
148
149PACKAGECONFIG[sqlite] = "--with-sqlite,--without-sqlite,sqlite3,"
150
151PACKAGECONFIG[beecrypt] = "--with-beecrypt=external,--without-beecrypt,beecrypt,"
152PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl,"
153PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss,"
154PACKAGECONFIG[gcrypt] = "--with-gcrypt,--without-gcrypt,gcrypt,"
155PACKAGECONFIG[keyutils] = "--with-keyutils,--without-keyutils,keyutils,"
156PACKAGECONFIG[libelf] = "--with-libelf,--without-libelf,elfutils,"
157
158WITH_SELINUX = "--with-selinux --with-sepol --with-semanage"
159WITHOUT_SELINUX = "--without-selinux --without-sepol --without-semanage"
160PACKAGECONFIG[selinux] = "${WITH_SELINUX},${WITHOUT_SELINUX},libselinux,"
161
162WITH_NEON = "--with-neon --with-libproxy --with-expat --without-gssapi"
163WITHOUT_NEON = "--without-neon --without-libproxy --without-expat --without-gssapi"
164PACKAGECONFIG[neon] = "${WITH_NEON},${WITHOUT_NEON},neon expat,"
165
166PACKAGECONFIG[lua] = "--with-lua,--without-lua,expat,"
167PACKAGECONFIG[tcl] = "--with-tcl,--without-tcl,tcl,"
168
169PACKAGECONFIG[augeas] = "--with-augeas,--without-augeas,augeas,"
170
171EXTRA_OECONF += "--verbose \
172 --sysconfdir=${sysconfdir} \
173 --with-file \
174 --with-path-magic=%{_usrlibrpm}/../../share/misc/magic.mgc \
175 --with-syck=internal \
176 --without-readline \
177 --without-libtasn1 \
178 --without-pakchois \
179 --without-gnutls \
180 --with-pcre \
181 --enable-utf8 \
182 --with-uuid \
183 --with-attr \
184 --with-acl \
185 --with-popt=external \
186 --with-pthreads \
187 --without-cudf \
188 --without-ficl \
189 --without-aterm \
190 --without-nix \
191 --without-bash \
192 --without-rc \
193 --without-js \
194 --without-gpsee \
195 --without-ruby \
196 --without-squirrel \
197 --with-build-extlibdep \
198 --with-build-maxextlibdep \
199 --without-valgrind \
200 --disable-openmp \
201 --enable-build-pic \
202 --enable-build-versionscript \
203 --enable-build-warnings \
204 --enable-build-debug \
205 --enable-maintainer-mode \
206 --with-path-macros=${rpm_macros} \
207 --with-path-lib=${libdir}/rpm \
208 --with-bugreport=http://bugzilla.yoctoproject.org \
209 --program-prefix= \
210 YACC=byacc"
211
212CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE"
213
214LDFLAGS_append_libc-uclibc = "-lrt -lpthread"
215
216PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm perl-module-rpm ${PN}-locale"
217
218SOLIBS = "5.4.so"
219
220# Based on %files section in the rpm.spec
221
222FILES_${PN} = "${bindir}/rpm \
223 ${bindir}/rpmconstant \
224 ${libdir}/rpm/rpm.* \
225 ${libdir}/rpm/tgpg \
226 ${libdir}/rpm/macros \
227 ${libdir}/rpm/rpmpopt \
228 ${libdir}/rpm/rpm2cpio \
229 ${libdir}/rpm/vcheck \
230 ${libdir}/rpm/helpers \
231 ${libdir}/rpm/qf \
232 ${libdir}/rpm/cpuinfo.yaml \
233 ${libdir}/rpm/bin/mtree \
234 ${libdir}/rpm/bin/rpmkey \
235 ${libdir}/rpm/bin/rpmrepo \
236 ${libdir}/rpm/bin/rpmrepo.real \
237 ${libdir}/rpm/bin/rpmspecdump \
238 ${libdir}/rpm/bin/rpmspecdump.real \
239 ${libdir}/rpm/bin/wget \
240 ${localstatedir}/cache \
241 ${localstatedir}/cache/rpm \
242 ${localstatedir}/cache/wdj \
243 ${localstatedir}/lib \
244 ${localstatedir}/lib/rpm \
245 ${localstatedir}/lib/wdj \
246 ${bindir}/rpm.real \
247 ${bindir}/rpmconstant.real \
248 ${bindir}/rpm2cpio.real \
249 "
250
251FILES_${PN}-dbg += "${libdir}/rpm/.debug \
252 ${libdir}/rpm/bin/.debug \
253 ${libdir}/python*/site-packages/rpm/.debug/_* \
254 "
255
256FILES_${PN}-common = "${bindir}/rpm2cpio \
257 ${bindir}/gendiff \
258 ${sysconfdir}/rpm \
259 ${localstatedir}/spool/repackage \
260 "
261
262FILES_${PN}-libs = "${libdir}/librpm-*.so \
263 ${libdir}/librpmconstant-*.so \
264 ${libdir}/librpmdb-*.so \
265 ${libdir}/librpmio-*.so \
266 ${libdir}/librpmmisc-*.so \
267 ${libdir}/librpmbuild-*.so \
268 "
269
270FILES_${PN}-build = "${prefix}/src/rpm \
271 ${bindir}/rpmbuild \
272 ${bindir}/rpmbuild.real \
273 ${libdir}/rpm/brp-* \
274 ${libdir}/rpm/check-files \
275 ${libdir}/rpm/cross-build \
276 ${libdir}/rpm/find-debuginfo.sh \
277 ${libdir}/rpm/find-lang.sh \
278 ${libdir}/rpm/find-prov.pl \
279 ${libdir}/rpm/find-provides.perl \
280 ${libdir}/rpm/find-req.pl \
281 ${libdir}/rpm/find-requires.perl \
282 ${libdir}/rpm/getpo.sh \
283 ${libdir}/rpm/http.req \
284 ${libdir}/rpm/javadeps.sh \
285 ${libdir}/rpm/mono-find-provides \
286 ${libdir}/rpm/mono-find-requires \
287 ${libdir}/rpm/executabledeps.sh \
288 ${libdir}/rpm/libtooldeps.sh \
289 ${libdir}/rpm/osgideps.pl \
290 ${libdir}/rpm/perldeps.pl \
291 ${libdir}/rpm/perl.prov \
292 ${libdir}/rpm/perl.req \
293 ${libdir}/rpm/php.prov \
294 ${libdir}/rpm/php.req \
295 ${libdir}/rpm/pkgconfigdeps.sh \
296 ${libdir}/rpm/pythondeps.sh \
297 ${libdir}/rpm/bin/debugedit \
298 ${libdir}/rpm/bin/debugedit.real \
299 ${libdir}/rpm/bin/rpmcache \
300 ${libdir}/rpm/bin/rpmcache.real \
301 ${libdir}/rpm/bin/rpmcmp \
302 ${libdir}/rpm/bin/rpmcmp.real \
303 ${libdir}/rpm/bin/rpmdeps \
304 ${libdir}/rpm/bin/rpmdeps.real \
305 ${libdir}/rpm/bin/rpmdeps-oecore \
306 ${libdir}/rpm/bin/rpmdeps-oecore.real \
307 ${libdir}/rpm/bin/rpmdigest \
308 ${libdir}/rpm/bin/rpmdigest.real \
309 ${libdir}/rpm/bin/abi-compliance-checker.pl \
310 ${libdir}/rpm/bin/api-sanity-autotest.pl \
311 ${libdir}/rpm/bin/chroot \
312 ${libdir}/rpm/bin/cp \
313 ${libdir}/rpm/bin/dbsql \
314 ${libdir}/rpm/bin/find \
315 ${libdir}/rpm/bin/install-sh \
316 ${libdir}/rpm/bin/lua \
317 ${libdir}/rpm/bin/luac \
318 ${libdir}/rpm/bin/mkinstalldirs \
319 ${libdir}/rpm/bin/rpmlua \
320 ${libdir}/rpm/bin/rpmluac \
321 ${libdir}/rpm/bin/sqlite3 \
322 ${libdir}/rpm/macros.d/cmake \
323 ${libdir}/rpm/macros.d/java \
324 ${libdir}/rpm/macros.d/libtool \
325 ${libdir}/rpm/macros.d/mandriva \
326 ${libdir}/rpm/macros.d/mono \
327 ${libdir}/rpm/macros.d/perl \
328 ${libdir}/rpm/macros.d/php \
329 ${libdir}/rpm/macros.d/pkgconfig \
330 ${libdir}/rpm/macros.d/python \
331 ${libdir}/rpm/macros.d/ruby \
332 ${libdir}/rpm/macros.d/selinux \
333 ${libdir}/rpm/macros.d/tcl \
334 ${libdir}/rpm/macros.rpmbuild \
335 ${libdir}/rpm/u_pkg.sh \
336 ${libdir}/rpm/vpkg-provides.sh \
337 ${libdir}/rpm/vpkg-provides2.sh \
338 ${libdir}/rpm/perfile_rpmdeps.sh \
339 "
340RDEPENDS_${PN} = "base-files run-postinsts"
341RDEPENDS_${PN}_class-native = ""
342RDEPENDS_${PN}_class-nativesdk = ""
343RDEPENDS_${PN}-build = "file bash perl"
344
345RDEPENDS_python-rpm = "${PN}"
346
347FILES_python-rpm = "${libdir}/python*/site-packages/rpm"
348PROVIDES += "python-rpm"
349
350FILES_perl-module-rpm = "${libdir}/perl/*/* \
351 "
352
353RDEPENDS_${PN}-dev += "bash"
354
355FILES_${PN}-dev = "${includedir}/rpm \
356 ${libdir}/librpm.la \
357 ${libdir}/librpm.so \
358 ${libdir}/librpmconstant.la \
359 ${libdir}/librpmconstant.so \
360 ${libdir}/librpmdb.la \
361 ${libdir}/librpmdb.so \
362 ${libdir}/librpmio.la \
363 ${libdir}/librpmio.so \
364 ${libdir}/librpmmisc.la \
365 ${libdir}/librpmmisc.so \
366 ${libdir}/librpmbuild.la \
367 ${libdir}/librpmbuild.so \
368 ${libdir}/rpm/lib/liblua.la \
369 ${libdir}/pkgconfig/rpm.pc \
370 ${libdir}/rpm/rpmdb_loadcvt \
371 "
372
373FILES_${PN}-staticdev = " \
374 ${libdir}/librpm.a \
375 ${libdir}/librpmconstant.a \
376 ${libdir}/librpmdb.a \
377 ${libdir}/librpmio.a \
378 ${libdir}/librpmmisc.a \
379 ${libdir}/librpmbuild.a \
380 ${libdir}/rpm/lib/liblua.a \
381 ${libdir}/python*/site-packages/rpm/*.a \
382 "
383
384do_configure() {
385 # Disable tests!
386 echo "all:" > ${S}/tests/Makefile.am
387 sed -e 's/@__MKDIR_P@/%{__mkdir} -p/' -i ${S}/macros/macros.in
388
389 ( cd ${S}; ${S}/autogen.sh )
390
391 # NASTY hack to make sure configure files the right pkg-config file...
392 sed -e 's/pkg-config --exists uuid/pkg-config --exists ossp-uuid/g' \
393 -e 's/pkg-config uuid/pkg-config ossp-uuid/g' -i ${S}/configure
394
395 ( cd ${S}/syck ; set +e ; rm -- -l* ; make distclean ) || :
396
397 export varprefix=${localstatedir}
398 oe_runconf
399}
400
401do_install_append() {
402 sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros
403 sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/*
404 sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/*
405 sed -i -e 's,%_repackage_all_erasures[^_].*,%_repackage_all_erasures 0,' ${D}/${libdir}/rpm/macros
406 sed -i -e 's,^#%_openall_before_chroot.*,%_openall_before_chroot\t1,' ${D}/${libdir}/rpm/macros
407
408 # Enable Debian style arbitrary tags...
409 sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros
410
411 install -m 0755 ${WORKDIR}/pythondeps.sh ${D}/${libdir}/rpm/pythondeps.sh
412 install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh
413
414 # Remove unpackaged files (based on list in rpm.spec)
415 rm -f ${D}/${libdir}/rpm/{Specfile.pm,cpanflute,cpanflute2,rpmdiff,rpmdiff.cgi,sql.prov,sql.req,tcl.req,trpm}
416
417 rm -f ${D}/${mandir}/man8/rpmcache.8*
418 rm -f ${D}/${mandir}/man8/rpmgraph.8*
419 rm -f ${D}/${mandir}/*/man8/rpmcache.8*
420 rm -f ${D}/${mandir}/*/man8/rpmgraph.8*
421 rm -rf ${D}/${mandir}/{fr,ko}
422
423 rm -f ${D}/${includedir}/popt.h
424 rm -f ${D}/${libdir}/libpopt.*
425 rm -f ${D}/${libdir}/pkgconfig/popt.pc
426 rm -f ${D}/${datadir}/locale/*/LC_MESSAGES/popt.mo
427 rm -f ${D}/${mandir}/man3/popt.3
428
429 rm -f ${D}/${mandir}/man1/xar.1*
430 rm -f ${D}/${bindir}/xar
431 rm -rf ${D}/${includedir}/xar
432 rm -f ${D}/${libdir}/libxar*
433
434 rm -f ${D}/${bindir}/lz*
435 rm -f ${D}/${bindir}/unlzma
436 rm -f ${D}/${bindir}/unxz
437 rm -f ${D}/${bindir}/xz*
438 rm -rf ${D}/${includedir}/lzma*
439 rm -f ${D}/${mandir}/man1/lz*.1
440 rm -f ${D}/${libdir}/pkgconfig/liblzma*
441
442 rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.{a,la}
443 rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.{a,la}
444
445 #find ${D}/${libdir}/perl5 -type f -a \( -name perllocal.pod -o -name .packlist \
446 # -o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';'
447 #find ${D}/${libdir}/perl5 -type d -depth -exec rmdir {} 2>/dev/null ';'
448
449 # We don't want the default macro set
450 rm -rf ${D}/${libdir}/rpm/{i[3456]86*,athlon*,pentium*,x86_64*,alpha*,sparc*,ia64*,ppc*,s390*,armv[34][lb]*,armv[345]*,mips*,noarch*}
451
452 rm -f ${D}/${libdir}/rpm/dbconvert.sh
453
454 rm -f ${D}/${libdir}/rpm/libsqldb.*
455
456 # We don't want, nor need the Mandriva multiarch items
457 rm -f ${D}/${bindir}/multiarch-dispatch
458 rm -f ${D}/${bindir}/multiarch-platform
459 rm -f ${D}/${libdir}/rpm/check-multiarch-files
460 rm -f ${D}/${libdir}/rpm/mkmultiarch
461 rm -f ${D}/${includedir}/multiarch-dispatch.h
462
463 rm -f ${D}/${libdir}/rpm/gstreamer.sh
464 rm -f ${D}/${libdir}/rpm/gem_helper.rb
465 rm -f ${D}/${libdir}/rpm/rubygems.rb
466 rm -f ${D}/${libdir}/rpm/kmod-deps.sh
467 rm -f ${D}/${libdir}/rpm/pythoneggs.py
468 rm -f ${D}/${libdir}/rpm/macros.d/kernel
469 rm -f ${D}/${libdir}/rpm/macros.d/gstreamer
470 rm -f ${D}/${libdir}/rpm/bin/mgo
471 rm -f ${D}/${libdir}/rpm/bin/dbconvert
472 rm -f ${D}/${libdir}/rpm/bin/pom2spec
473
474 rm -rf ${D}/var/lib/wdj ${D}/var/cache/wdj
475 rm -f ${D}/${libdir}/rpm/bin/api-sanity-checker.pl
476
477}
478
479add_native_wrapper() {
480 create_wrapper ${D}/${bindir}/rpm \
481 RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
482 RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
483 RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
484
485 create_wrapper ${D}/${bindir}/rpm2cpio \
486 RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
487 RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
488 RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
489
490 create_wrapper ${D}/${bindir}/rpmbuild \
491 RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
492 RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
493 RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
494
495 create_wrapper ${D}/${bindir}/rpmconstant \
496 RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
497 RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
498 RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
499
500 for rpm_binary in ${D}/${libdir}/rpm/bin/rpm* ${D}/${libdir}/rpm/bin/debugedit; do
501 create_wrapper $rpm_binary \
502 RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
503 RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
504 RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
505 done
506}
507
508do_install_append_class-native() {
509 add_native_wrapper
510}
511
512do_install_append_class-nativesdk() {
513 add_native_wrapper
514}
515
516BBCLASSEXTEND = "native nativesdk"