bcache-tools-1.0.8_p20140220-r1.ebuild 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python3_{4,5} )
  5. inherit eutils flag-o-matic python-r1 toolchain-funcs udev
  6. DESCRIPTION="Tools for bcachefs"
  7. HOMEPAGE="http://bcache.evilpiepirate.org/"
  8. SRC_URI="
  9. https://github.com/g2p/bcache-tools/archive/v${PV%%_p*}.tar.gz -> ${P}.tgz
  10. https://dev.gentoo.org/~jlec/distfiles/bcache-status-20140220.tar.gz
  11. "
  12. SLOT="0"
  13. LICENSE="GPL-2"
  14. KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
  15. IUSE=""
  16. REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  17. RDEPEND="${PYTHON_DEPS}
  18. >=sys-apps/util-linux-2.24"
  19. DEPEND="${RDEPEND}"
  20. PATCHES=(
  21. "${FILESDIR}"/${PV}/bcache-status-python3.patch
  22. "${FILESDIR}"/${PV}/bcache-tools-1.0.8-crc64.patch
  23. "${FILESDIR}"/${PV}/bcache-tools-1.0.8-noprobe.patch
  24. "${FILESDIR}"/${PV}/bcache-tools-20131018-fedconf.patch
  25. "${FILESDIR}"/${PV}/bcache-tools-status-20130826-man.patch
  26. )
  27. S="${WORKDIR}"/${P%%_p*}
  28. src_prepare() {
  29. tc-export CC
  30. sed \
  31. -e '/^CFLAGS/s:-O2::' \
  32. -e '/^CFLAGS/s:-g:-std=gnu99:' \
  33. -i Makefile || die
  34. append-lfs-flags
  35. cp ../bcache-status*/bcache-status . || die
  36. epatch "${PATCHES[@]}"
  37. }
  38. src_install() {
  39. into /
  40. dosbin make-bcache bcache-super-show
  41. exeinto $(get_udevdir)
  42. doexe bcache-register probe-bcache
  43. python_foreach_impl python_doscript bcache-status
  44. udev_dorules 69-bcache.rules
  45. insinto /etc/initramfs-tools/hooks/bcache
  46. doins initramfs/hook
  47. # that is what dracut does
  48. insinto /usr/lib/dracut/modules.d/90bcache
  49. doins dracut/module-setup.sh
  50. doman *.8
  51. dodoc README
  52. }
  53. pkg_postinst() {
  54. udev_reload
  55. }