ostree: improve package split logic and define extra packages
Define extra packages to cover the bash-completion and dracut related
files, as they are not necessarily required by ostree.
@@ -3,7 +3,7 @@ HOMEPAGE = "https://ostree.readthedocs.io/en/latest/"
LICENSE = "LGPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-inherit autotools pkgconfig systemd gobject-introspection
+inherit autotools pkgconfig systemd bash-completion gobject-introspection
SRC_URI = "gitsm://github.com/ostreedev/ostree.git;branch=master"
@@ -18,7 +18,7 @@ BBCLASSEXTEND = "native"
DEPENDS += "attr libarchive libcap glib-2.0 gpgme libgsystem fuse e2fsprogs curl xz"
DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
-RDEPENDS_${PN} = "bash"
+RDEPENDS_${PN}-dracut = "bash"
CFLAGS_append = " -Wno-error=missing-prototypes"
EXTRA_OECONF = "--disable-gtk-doc --disable-man --with-smack --with-builtin-grub2-mkconfig --with-curl --without-soup"
@@ -35,8 +35,6 @@ do_configure[vardeps] += "SYSROOT_DIR"
SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service"
-FILES_${PN} += "${libdir}/ostree/ ${libdir}/ostbuild"
-
export BUILD_SYS
export HOST_SYS
export STAGING_INCDIR
@@ -51,19 +49,21 @@ do_install_append_class-native() {
create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator"
}
-
-FILES_${PN} += " \
- ${@bb.utils.contains('DISTRO_FEATURES','systemd','${libdir}/dracut', '', d)} \
- ${datadir}/gir-1.0 \
- ${datadir}/gir-1.0/OSTree-1.0.gir \
- ${libdir}/girepository-1.0 \
- ${libdir}/girepository-1.0/OSTree-1.0.typelib \
- ${libdir}/tmpfiles.d/ostree-tmpfiles.conf \
- ${datadir}/bash-completion/completions/ostree \
- ${systemd_unitdir}/system-generators/ostree-system-generator \
+PACKAGES += " \
+ ${PN}-switchroot \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'ostree-dracut', '', d)} \
"
-PACKAGES =+ "${PN}-switchroot"
-
+FILES_${PN} = "${bindir} \
+ ${sysconfdir}/ostree \
+ ${datadir}/ostree \
+ ${libdir}/*.so.* \
+ ${libdir}/ostree/ostree-grub-generator \
+ ${libdir}/ostree/ostree-remount \
+ ${libdir}/girepository-1.0/* \
+ ${@bb.utils.contains('DISTRO_FEATURES','systemd','${libdir}/tmpfiles.d', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES','systemd','${systemd_unitdir}/system-generators', '', d)} \
+"
+FILES_${PN}-dev += " ${datadir}/gir-1.0"
+FILES_${PN}-dracut = "${sysconfdir}/dracut.conf.d ${libdir}/dracut"
FILES_${PN}-switchroot = "${libdir}/ostree/ostree-prepare-root"
-RDEPENDS_${PN}-switchroot = ""
