freebsd-pf-8.2.ebuild 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Copyright 1999-2012 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. inherit bsdmk freebsd user
  4. DESCRIPTION="FreeBSD's base system libraries"
  5. SLOT="0"
  6. KEYWORDS="~x86-fbsd"
  7. IUSE=""
  8. # Crypto is needed to have an internal OpenSSL header
  9. SRC_URI="mirror://gentoo/${USBIN}.tar.bz2
  10. mirror://gentoo/${SBIN}.tar.bz2
  11. mirror://gentoo/${CONTRIB}.tar.bz2
  12. mirror://gentoo/${ETC}.tar.bz2"
  13. RDEPEND="net-libs/libpcap"
  14. DEPEND="${RDEPEND}
  15. dev-libs/libevent
  16. sys-freebsd/freebsd-mk-defs
  17. =sys-freebsd/freebsd-sources-${RV}*"
  18. S="${WORKDIR}"
  19. SUBDIRS="usr.sbin/authpf sbin/pfctl sbin/pflogd usr.sbin/ftp-proxy/ftp-proxy"
  20. pkg_setup() {
  21. enewgroup authpf 63
  22. mymakeopts="${mymakeopts} NO_MANCOMPRESS= NO_INFOCOMPRESS= "
  23. }
  24. src_unpack() {
  25. freebsd_src_unpack
  26. # pcap-int.h redefines snprintf as pcap_snprintf
  27. epatch "${FILESDIR}/${PN}-7.0-pcap_pollution.patch"
  28. # Use system's libevent
  29. epatch "${FILESDIR}/${PN}-7.0-libevent.patch"
  30. # Link in kernel sources
  31. ln -s "/usr/src/sys-${RV}" "${WORKDIR}/sys"
  32. }
  33. src_compile() {
  34. for dir in ${SUBDIRS}; do
  35. einfo "Starting make in ${dir}"
  36. cd "${S}/${dir}"
  37. mkmake || die "Make ${dir} failed"
  38. done
  39. }
  40. src_install() {
  41. for dir in ${SUBDIRS}; do
  42. einfo "Starting install in ${dir}"
  43. cd "${S}/${dir}"
  44. mkinstall || die "Install ${dir} failed"
  45. done
  46. cd "${WORKDIR}"/etc
  47. insinto /etc
  48. doins pf.os
  49. newdoc pf.conf pf.conf.example
  50. # pf.initd provided by openrc, but no pf.confd
  51. newconfd "${FILESDIR}/pf.confd" pf
  52. }