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