bcache-tools-1.0.8.ebuild 950 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit toolchain-funcs udev
  5. DESCRIPTION="Tools for bcachefs"
  6. HOMEPAGE="http://bcache.evilpiepirate.org/"
  7. SRC_URI="https://github.com/g2p/bcache-tools/archive/v${PV}.tar.gz -> ${P}.tgz"
  8. SLOT="0"
  9. LICENSE="GPL-2"
  10. KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
  11. IUSE=""
  12. RDEPEND=">=sys-apps/util-linux-2.24"
  13. DEPEND="${RDEPEND}"
  14. src_prepare() {
  15. tc-export CC
  16. sed \
  17. -e '/^CFLAGS/s:-O2::' \
  18. -e '/^CFLAGS/s:-g:-std=gnu89:' \
  19. -i Makefile || die
  20. }
  21. src_install() {
  22. into /
  23. dosbin make-bcache bcache-super-show
  24. exeinto $(get_udevdir)
  25. doexe bcache-register probe-bcache
  26. udev_dorules 69-bcache.rules
  27. insinto /etc/initramfs-tools/hooks/bcache
  28. doins initramfs/hook
  29. # that is what dracut does
  30. insinto /usr/lib/dracut/modules.d/90bcache
  31. doins dracut/module-setup.sh
  32. doman *.8
  33. dodoc README
  34. }
  35. pkg_postinst() {
  36. udev_reload
  37. }