zerofree-1.0.3.ebuild 888 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="4"
  4. inherit eutils toolchain-funcs
  5. DESCRIPTION="Zero's out all free space on a filesystem"
  6. HOMEPAGE="http://intgat.tigress.co.uk/rmy/uml/index.html"
  7. SRC_URI="http://intgat.tigress.co.uk/rmy/uml/${P}.tgz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~arm ~x86 ~mips"
  11. IUSE=""
  12. DEPEND="sys-libs/e2fsprogs-libs"
  13. RDEPEND="${DEPEND}"
  14. src_prepare() {
  15. # Honor system CFLAGS.
  16. sed -i \
  17. -e "s:CC=gcc:CC=$(tc-getCC)\nCFLAGS=${CFLAGS}\nLDFLAGS=${LDFLAGS}:g" \
  18. -e "s:-o zerofree:\$(CFLAGS) \$(LDFLAGS) -o zerofree:g" \
  19. -e "/-lext2fs/{ s:-lext2fs::g; s:$: -lext2fs:g; }" \
  20. Makefile || die "Failed to sed the Makefile"
  21. }
  22. src_compile() {
  23. # Just a Makefile, nothing fancy.
  24. make || die "Failed to compile ${PN}."
  25. }
  26. src_install() {
  27. # Install into /sbin
  28. into /
  29. dosbin zerofree
  30. }