diald-1.0-r2.ebuild 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. inherit eutils autotools pam
  4. DESCRIPTION="Daemon that provides on demand IP links via SLIP or PPP"
  5. HOMEPAGE="http://diald.sourceforge.net"
  6. SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
  7. LICENSE="Old-MIT GPL-2" # GPL-2 only for init script
  8. SLOT="0"
  9. KEYWORDS="~amd64 x86"
  10. IUSE="pam"
  11. DEPEND="pam? ( virtual/pam )
  12. sys-apps/tcp-wrappers"
  13. RDEPEND="${DEPEND}
  14. net-dialup/ppp"
  15. src_unpack() {
  16. unpack ${A}
  17. epatch "${FILESDIR}/${P}-posix.patch"
  18. epatch "${FILESDIR}/${P}-gentoo.patch"
  19. if ! use pam; then
  20. epatch "${FILESDIR}/${P}-nopam.patch"
  21. rm "${S}"/README.pam
  22. cd "${S}"
  23. eautoconf
  24. fi
  25. }
  26. src_install() {
  27. make \
  28. DESTDIR="${D}" \
  29. sysconfdir=/etc \
  30. bindir=/usr/bin \
  31. sbindir=/usr/sbin \
  32. mandir=/usr/share/man \
  33. libdir=/usr/lib/diald \
  34. BINGRP=root \
  35. ROOTUID=root \
  36. ROOTGRP=root \
  37. install || die "make failed"
  38. use pam && pamd_mimic_system diald auth account
  39. dodir /var/cache/diald
  40. mknod -m 0660 "${D}/var/cache/diald/diald.ctl" p
  41. dodoc BUGS CHANGES NOTES README* \
  42. THANKS TODO TODO.budget doc/diald-faq.txt
  43. docinto setup ; cp -pPR setup/* "${D}/usr/share/doc/${PF}/setup"
  44. docinto contrib ; cp -pPR contrib/* "${D}/usr/share/doc/${PF}/contrib"
  45. prepalldocs
  46. insinto /etc/diald ; doins "${FILESDIR}"/{diald.conf,diald.filter}
  47. newinitd "${FILESDIR}/diald-init" diald
  48. }