From 8791b7b9d902fba6776ce1a4f1952377cd395d8e Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Thu, 21 Sep 2023 11:02:25 +0200 Subject: sys-fs/bcache-tools: use upstream's 'install' target This hopefully reduces the chances that new binaries and similar things are not installed when bumping the package. Signed-off-by: Florian Schmaus --- .../bcache-tools-1.1_p20230217-r1.ebuild | 78 ++++++++++++++++++++++ .../bcache-tools/bcache-tools-1.1_p20230217.ebuild | 74 -------------------- 2 files changed, 78 insertions(+), 74 deletions(-) create mode 100644 sys-fs/bcache-tools/bcache-tools-1.1_p20230217-r1.ebuild delete mode 100644 sys-fs/bcache-tools/bcache-tools-1.1_p20230217.ebuild diff --git a/sys-fs/bcache-tools/bcache-tools-1.1_p20230217-r1.ebuild b/sys-fs/bcache-tools/bcache-tools-1.1_p20230217-r1.ebuild new file mode 100644 index 000000000000..9577ad30f308 --- /dev/null +++ b/sys-fs/bcache-tools/bcache-tools-1.1_p20230217-r1.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit flag-o-matic python-r1 toolchain-funcs udev vcs-snapshot + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/colyli/bcache-tools.git https://kernel.googlesource.com/pub/scm/linux/kernel/git/colyli/bcache-tools.git" +else + SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/colyli/${PN}.git/snapshot/a5e3753516bd39c431def86c8dfec8a9cea1ddd4.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux" +fi + +DESCRIPTION="Tools for bcache" +HOMEPAGE="https://bcache.evilpiepirate.org/ https://git.kernel.org/pub/scm/linux/kernel/git/colyli/bcache-tools.git/" + +SLOT="0" +LICENSE="GPL-2" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND=" + ${PYTHON_DEPS} + sys-apps/util-linux + virtual/udev +" +DEPEND="${RDEPEND}" + +src_prepare() { + default + + tc-export CC + sed \ + -e '/^CFLAGS/s:-O2::' \ + -e '/^CFLAGS/s:-g::' \ + -e '/.*INSTALL.*share\/man/d' \ + -e '/.*INSTALL.*bcache-status/d' \ + -i Makefile || die + + append-lfs-flags +} + +src_install() { + local udevdir="$(get_udevdir)" + + local mydirs=( + sbin + "${udevdir}/rules.d" + /usr/share/initramfs-tools/hooks/bcache + /usr/lib/initcpio/install/bcache + ) + dodir "${mydirs[@]}" + + emake \ + DESTDIR="${D}" \ + PREFIX="${EPREFIX}" \ + UDEVLIBDIR="${udevdir}" \ + DRACUTLIBDIR="/usr/lib/dracut" \ + install + + python_foreach_impl python_doscript bcache-status + + doman *.8 + + dodoc README +} + +pkg_postinst() { + udev_reload +} + +pkg_postrm() { + udev_reload +} diff --git a/sys-fs/bcache-tools/bcache-tools-1.1_p20230217.ebuild b/sys-fs/bcache-tools/bcache-tools-1.1_p20230217.ebuild deleted file mode 100644 index 88fe95d15846..000000000000 --- a/sys-fs/bcache-tools/bcache-tools-1.1_p20230217.ebuild +++ /dev/null @@ -1,74 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{10..12} ) - -inherit flag-o-matic python-r1 toolchain-funcs udev vcs-snapshot - -if [[ "${PV}" == "9999" ]]; then - inherit git-r3 - EGIT_REPO_URI="https://git.kernel.org/pub/scm/linux/kernel/git/colyli/bcache-tools.git https://kernel.googlesource.com/pub/scm/linux/kernel/git/colyli/bcache-tools.git" -else - SRC_URI="https://git.kernel.org/pub/scm/linux/kernel/git/colyli/${PN}.git/snapshot/a5e3753516bd39c431def86c8dfec8a9cea1ddd4.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86 ~amd64-linux ~x86-linux" -fi - -DESCRIPTION="Tools for bcache" -HOMEPAGE="https://bcache.evilpiepirate.org/ https://git.kernel.org/pub/scm/linux/kernel/git/colyli/bcache-tools.git/" - -SLOT="0" -LICENSE="GPL-2" - -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -RDEPEND=" - ${PYTHON_DEPS} - sys-apps/util-linux - virtual/udev -" -DEPEND="${RDEPEND}" - -src_prepare() { - default - - tc-export CC - sed \ - -e '/^CFLAGS/s:-O2::' \ - -e '/^CFLAGS/s:-g::' \ - -i Makefile || die - - append-lfs-flags -} - -src_install() { - into / - dosbin bcache make-bcache bcache-super-show - - exeinto $(get_udevdir) - doexe bcache-register probe-bcache - - python_foreach_impl python_doscript bcache-status - - udev_dorules 69-bcache.rules - - insinto /etc/initramfs-tools/hooks/bcache - doins initramfs/hook - - # that is what dracut does - insinto /usr/lib/dracut/modules.d/90bcache - doins dracut/module-setup.sh - - doman *.8 - - dodoc README -} - -pkg_postinst() { - udev_reload -} - -pkg_postrm() { - udev_reload -} -- cgit v1.2.3-65-gdbad