rename-1.3-r2.ebuild 911 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit toolchain-funcs eutils
  5. DESCRIPTION="Easily rename 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. MY_PATCHES=(
  12. "${FILESDIR}"/${P}-rename.patch
  13. "${FILESDIR}"/${P}-build.patch
  14. "${FILESDIR}"/${P}-gcc44.patch
  15. )
  16. DOCS=( README ChangeLog )
  17. src_prepare() {
  18. default
  19. sed -i \
  20. -e '/^CFLAGS/s:-O3:@CFLAGS@:' \
  21. -e '/strip /s:.*::' \
  22. Makefile.in || die
  23. epatch "${MY_PATCHES[@]}"
  24. tc-export CC
  25. }
  26. src_install() {
  27. newbin "${PN}" "${PN}xm"
  28. newman "${PN}.1" "${PN}xm.1"
  29. }
  30. pkg_postinst() {
  31. ewarn "This has been renamed to '${PN}xm' to avoid"
  32. ewarn "a naming conflict with sys-apps/util-linux."
  33. }