diald-1.0-r3.ebuild 1.4 KB

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