# Specify the default rpm macros in terms of adjustable variables
rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros"
rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
+rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
# sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux
# Note: perl and sqlite w/o db specified does not currently work.
# tcl, augeas, nss, gcrypt, xar and keyutils support is untested.
-PACKAGECONFIG_class-native ??= "db bzip2 zlib beecrypt openssl libelf python"
PACKAGECONFIG ??= "db bzip2 zlib beecrypt openssl libelf python"
PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2,"
${libdir}/rpm/bin/rpmrepo \
${libdir}/rpm/bin/rpmspecdump \
${libdir}/rpm/bin/wget \
- /var/lib/rpm \
- /var/cache/rpm \
+ ${libdir}/rpm \
+ ${localstatedir}/cache \
+ ${localstatedir}/cache/rpm \
+ ${localstatedir}/cache/wdj \
+ ${localstatedir}/lib \
+ ${localstatedir}/lib/rpm \
+ ${localstatedir}/lib/wdj \
+ ${bindir}/rpm.real \
+ ${bindir}/rpmconstant.real \
+ ${bindir}/rpm2cpio.real \
"
FILES_${PN}-dbg += "${libdir}/rpm/.debug \
FILES_${PN}-common = "${bindir}/rpm2cpio \
${bindir}/gendiff \
${sysconfdir}/rpm \
- /var/spool/repackage \
+ ${localstatedir}/spool/repackage \
"
FILES_${PN}-libs = "${libdir}/librpm-*.so \
FILES_${PN}-build = "${prefix}/src/rpm \
${bindir}/rpmbuild \
+ ${bindir}/rpmbuild.real \
${libdir}/rpm/brp-* \
${libdir}/rpm/check-files \
${libdir}/rpm/cross-build \
"
RDEPENDS_${PN} = "base-files run-postinsts"
RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}_class-nativesdk = ""
RDEPENDS_${PN}-build = "file"
RDEPENDS_python-rpm = "${PN}"
}
-do_install_append_class-native() {
+add_native_wrapper() {
create_wrapper ${D}/${bindir}/rpm \
RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
done
}
-BBCLASSEXTEND = "native"
+do_install_append_class-native() {
+ add_native_wrapper
+}
+
+do_install_append_class-nativesdk() {
+ add_native_wrapper
+}
+
+BBCLASSEXTEND = "native nativesdk"