rename-1.3-r1.ebuild 909 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit toolchain-funcs eutils
  5. DESCRIPTION="tool for easily renaming files"
  6. HOMEPAGE="http://rename.sourceforge.net/"
  7. SRC_URI="http://${PN}/sourceforge.net/${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
  11. IUSE=""
  12. PATCHES=(
  13. "${FILESDIR}"/${P}-rename.patch
  14. "${FILESDIR}"/${P}-build.patch
  15. "${FILESDIR}"/${P}-gcc44.patch
  16. )
  17. src_prepare() {
  18. sed -i \
  19. -e '/^CFLAGS/s:-O3:@CFLAGS@:' \
  20. -e '/strip /s:.*::' \
  21. Makefile.in || die
  22. epatch "${PATCHES[@]}"
  23. tc-export CC
  24. }
  25. src_install() {
  26. newbin rename renamexm
  27. newman rename.1 renamexm.1
  28. dodoc README ChangeLog
  29. }
  30. pkg_postinst() {
  31. ewarn "This has been renamed to 'renamexm' to avoid"
  32. ewarn "a naming conflict with sys-apps/util-linux."
  33. }