freebsd-pf-9.1.ebuild 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Copyright 1999-2013 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="~amd64-fbsd ~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-${RV}*
  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}-9.0-pcap_pollution.patch"
  28. # Use system's libevent
  29. epatch "${FILESDIR}/${PN}-9.0-libevent.patch"
  30. epatch "${FILESDIR}/${PN}-9.0-pflogd.patch"
  31. epatch "${FILESDIR}/${PN}-9.0-bpf.patch"
  32. epatch "${FILESDIR}/${PN}-9.0-getline.patch"
  33. # Link in kernel sources
  34. ln -s "/usr/src/sys-${RV}" "${WORKDIR}/sys"
  35. }
  36. src_compile() {
  37. for dir in ${SUBDIRS}; do
  38. einfo "Starting make in ${dir}"
  39. cd "${S}/${dir}"
  40. mkmake || die "Make ${dir} failed"
  41. done
  42. }
  43. src_install() {
  44. for dir in ${SUBDIRS}; do
  45. einfo "Starting install in ${dir}"
  46. cd "${S}/${dir}"
  47. mkinstall || die "Install ${dir} failed"
  48. done
  49. cd "${WORKDIR}"/etc
  50. insinto /etc
  51. doins pf.os
  52. # pf.initd provided by openrc, but no pf.confd
  53. newconfd "${FILESDIR}/pf.confd" pf
  54. }