authbind-2.1.1.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils multilib flag-o-matic
  5. DESCRIPTION="Bind sockets to privileged ports without root"
  6. HOMEPAGE="http://www.chiark.greenend.org.uk/ucgi/~ian/git/authbind.git/"
  7. SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${PN}_${PV}.tar.gz"
  8. LICENSE="GPL-2+"
  9. SLOT="0"
  10. KEYWORDS="~amd64"
  11. IUSE=""
  12. DEPEND=""
  13. RDEPEND=""
  14. src_prepare() {
  15. epatch "${FILESDIR}/${P}-respect-flags.patch"
  16. }
  17. src_configure() {
  18. sed -i \
  19. -e "s|^prefix=.*|prefix=/usr|" \
  20. -e "s|^lib_dir=.*|lib_dir=\$(prefix)/$(get_libdir)|" \
  21. -e "s|^libexec_dir=.*|libexec_dir=\$(prefix)/libexec/authbind|" \
  22. -e "s|^SHARED_LDFLAGS=.*|SHARED_LDFLAGS=$(raw-ldflags)|" \
  23. Makefile || die "sed failed"
  24. sed -i \
  25. -e 's|/usr/lib|/usr/libexec|' \
  26. authbind-helper.8 || die "sed failed"
  27. }
  28. src_install() {
  29. dobin authbind
  30. doman authbind.1 authbind-helper.8
  31. ln -s libauthbind.so.* libauthbind.so.$(awk -F= '/MAJOR=/ { print $2 }' < Makefile)
  32. dolib.so libauthbind.so*
  33. exeinto /usr/libexec/authbind
  34. exeopts -m4755
  35. doexe helper
  36. keepdir /etc/authbind/by{addr,port,uid}
  37. dodoc debian/changelog
  38. }