lprng-3.8.35-r3.ebuild 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit eutils flag-o-matic
  5. MY_PN=LPRng
  6. DESCRIPTION="Extended implementation of the Berkeley LPR print spooler"
  7. HOMEPAGE="http://www.lprng.com/"
  8. SRC_URI="ftp://ftp.lprng.com/pub/${MY_PN}/${MY_PN}/${MY_PN}-${PV}.tgz"
  9. LICENSE="|| ( GPL-2 Artistic )"
  10. SLOT="0"
  11. KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86"
  12. IUSE="foomaticdb kerberos nls ssl"
  13. RDEPEND="sys-process/procps
  14. ssl? ( dev-libs/openssl )
  15. foomaticdb? ( || ( net-print/cups-filters[foomatic] net-print/foomatic-filters )
  16. net-print/foomatic-db )
  17. !>=net-print/cups-1.6.2-r4[-lprng-compat]
  18. !<net-print/cups-1.6.2-r4"
  19. DEPEND="${RDEPEND}
  20. nls? ( sys-devel/gettext )
  21. kerberos? ( app-crypt/mit-krb5 )"
  22. S=${WORKDIR}/${MY_PN}-${PV}
  23. src_prepare() {
  24. epatch "${FILESDIR}"/${PN}-3.8.27-certs.diff
  25. epatch "${FILESDIR}"/${PN}-3.8.28-make.diff
  26. epatch "${FILESDIR}"/${PN}-3.8.28-krb.diff
  27. }
  28. src_configure() {
  29. # wont compile with -O3, needs -O2
  30. replace-flags -O[3-9] -O2
  31. econf \
  32. $(use_enable nls) \
  33. $(use_enable kerberos) \
  34. $(use_enable ssl) \
  35. --disable-setuid \
  36. --disable-werror \
  37. --with-userid=lp \
  38. --with-groupid=lp \
  39. --with-lpd_conf_path=/etc/lprng/lpd.conf \
  40. --with-lpd_perms_path=/etc/lprng/lpd.perms \
  41. --libexecdir=/usr/libexec/lprng \
  42. --sysconfdir=/etc/lprng \
  43. --disable-strip
  44. }
  45. src_compile() {
  46. # bash is necessary due to bashisms in libtool
  47. emake -j1 SHELL=/bin/bash
  48. }
  49. src_install() {
  50. dodir /var/spool/lpd
  51. diropts -m 700 -o lp -g lp
  52. dodir /var/spool/lpd/lp
  53. emake install \
  54. DESTDIR="${D}" \
  55. POSTINSTALL="NO" \
  56. gnulocaledir="${D}"/usr/share/locale
  57. dodoc CHANGES README VERSION "${FILESDIR}"/printcap lpd.conf lpd.perms
  58. insinto /etc/lprng
  59. doins "${FILESDIR}"/printcap lpd.conf lpd.perms
  60. dosym /etc/lprng/printcap /etc/printcap
  61. newinitd "${FILESDIR}"/lprng-init lprng
  62. }
  63. pkg_postinst() {
  64. einfo "If printing does not work, try 'checkpc'/'checkpc -f'"
  65. }