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