quota-4.03.ebuild 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit autotools eutils
  5. DESCRIPTION="Linux quota tools"
  6. HOMEPAGE="https://sourceforge.net/projects/linuxquota/"
  7. SRC_URI="mirror://sourceforge/linuxquota/${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
  11. IUSE="ldap netlink nls rpc tcpd"
  12. RDEPEND="ldap? ( >=net-nds/openldap-2.3.35 )
  13. netlink? (
  14. sys-apps/dbus
  15. dev-libs/libnl:3
  16. )
  17. rpc? ( net-nds/rpcbind )
  18. tcpd? ( sys-apps/tcp-wrappers )"
  19. DEPEND="${RDEPEND}
  20. nls? ( sys-devel/gettext )"
  21. PATCHES=(
  22. # Patches from upstream
  23. "${FILESDIR}/${P}-fix_build_without_ldap.patch"
  24. "${FILESDIR}/${P}-distribute_ldap-scripts.patch"
  25. "${FILESDIR}/${P}-explicitely_print_disabled_options.patch"
  26. "${FILESDIR}/${P}-respect_docdir.patch"
  27. "${FILESDIR}/${P}-dont_override_cflags.patch"
  28. "${FILESDIR}/${P}-default_fpic_fpie.patch"
  29. "${FILESDIR}/${P}-repqouta_F_option_arg.patch"
  30. "${FILESDIR}/${P}-noldap_linking.patch"
  31. # Patches not (yet) upstreamed
  32. "${FILESDIR}/${P}-no_rpc.patch"
  33. )
  34. src_prepare() {
  35. epatch "${PATCHES[@]}"
  36. eautoreconf
  37. }
  38. src_configure() {
  39. econf \
  40. --docdir="${EPREFIX}/usr/share/doc/${PF}" \
  41. $(use_enable nls) \
  42. $(use_enable ldap ldapmail) \
  43. $(use_enable netlink) \
  44. $(use_enable rpc) \
  45. $(use_enable rpc rpcsetquota)
  46. }
  47. src_install() {
  48. emake DESTDIR="${D}" install
  49. dodoc doc/* README.* Changelog
  50. rm -r "${ED}"/usr/include || die #70938
  51. insinto /etc
  52. insopts -m0644
  53. doins warnquota.conf quotatab
  54. newinitd "${FILESDIR}"/quota.rc7 quota
  55. newconfd "${FILESDIR}"/quota.confd quota
  56. if use rpc ; then
  57. newinitd "${FILESDIR}"/rpc.rquotad.initd rpc.rquotad
  58. fi
  59. if use ldap ; then
  60. insinto /etc/openldap/schema
  61. insopts -m0644
  62. doins "${FILESDIR}"/ldap-scripts/quota.schema
  63. exeinto /usr/share/quota/ldap-scripts
  64. doexe "${FILESDIR}"/ldap-scripts/*.pl
  65. doexe "${FILESDIR}"/ldap-scripts/edquota_editor
  66. fi
  67. }