quota-3.17-r1.ebuild 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. inherit eutils flag-o-matic
  4. DESCRIPTION="Linux quota tools"
  5. HOMEPAGE="https://sourceforge.net/projects/linuxquota/"
  6. SRC_URI="mirror://sourceforge/linuxquota/${P}.tar.gz"
  7. LICENSE="GPL-2"
  8. SLOT="0"
  9. KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sparc x86"
  10. IUSE="nls tcpd ldap rpc"
  11. RDEPEND="ldap? ( >=net-nds/openldap-2.3.35 )
  12. tcpd? ( sys-apps/tcp-wrappers )
  13. rpc? ( || ( net-nds/portmap net-nds/rpcbind ) )"
  14. DEPEND="${RDEPEND}
  15. nls? ( sys-devel/gettext )"
  16. S=${WORKDIR}/quota-tools
  17. src_unpack() {
  18. unpack ${A}
  19. cd "${S}"
  20. # patch to prevent quotactl.2 manpage from being installed
  21. # that page is provided by man-pages instead
  22. epatch "${FILESDIR}"/${PN}-no-quotactl-manpage.patch
  23. # This was for openldap-2.2 support before,
  24. # Now we only support >=2.3
  25. append-cppflags -DLDAP_DEPRECATED=0
  26. sed -i -e "s:,LIBS=\"\$saved_LIBS=\":;LIBS=\"\$saved_LIBS\":" configure
  27. }
  28. src_compile() {
  29. econf \
  30. $(use_enable nls) \
  31. $(use_enable ldap ldapmail) \
  32. $(use_enable rpc) \
  33. $(use_enable rpc rpcsetquota) \
  34. || die
  35. emake || die
  36. }
  37. src_install() {
  38. emake STRIP="" ROOTDIR="${D}" install || die
  39. rm -r "${D}"/usr/include || die #70938
  40. insinto /etc
  41. insopts -m0644
  42. doins warnquota.conf quotatab
  43. ecvs_clean
  44. dodoc doc/*
  45. dodoc README.*
  46. dodoc Changelog
  47. newinitd "${FILESDIR}"/quota.rc7 quota
  48. newconfd "${FILESDIR}"/quota.confd quota
  49. if use rpc ; then
  50. newinitd "${FILESDIR}"/rpc.rquotad.initd rpc.rquotad
  51. else
  52. rm -f "${D}"/usr/sbin/rpc.rquotad
  53. fi
  54. if use ldap ; then
  55. insinto /etc/openldap/schema
  56. insopts -m0644
  57. doins ldap-scripts/quota.schema
  58. exeinto /usr/share/quota/ldap-scripts
  59. doexe ldap-scripts/*.pl
  60. doexe ldap-scripts/edquota_editor
  61. fi
  62. }