Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # $OpenBSD: Makefile,v 1.23 2017/04/10 11:46:32 sthen Exp $
  2. COMMENT= IP accounting software
  3. DISTNAME= pmacct-1.5.3
  4. REVISION= 0
  5. CATEGORIES= net
  6. HOMEPAGE= http://www.pmacct.net/
  7. # GPLv2
  8. PERMIT_PACKAGE_CDROM= Yes
  9. WANTLIB= c m pcap pthread sqlite3>=8 z
  10. MASTER_SITES= ${HOMEPAGE}
  11. NO_TEST= Yes
  12. CONFIGURE_STYLE= autoconf no-autoheader
  13. AUTOCONF_VERSION= 2.13
  14. USE_GMAKE= Yes
  15. CONFIGURE_ARGS= --enable-ipv6 \
  16. --enable-sqlite3 \
  17. --with-sqlite3-includes="${LOCALBASE}/include"
  18. .ifdef DEBUG
  19. MAKE_ARGS+= DEBUG=1
  20. .endif
  21. FLAVORS= mysql postgresql
  22. FLAVOR?=
  23. LIB_DEPENDS+= databases/sqlite3
  24. .if ${FLAVOR:Mpostgresql}
  25. LIB_DEPENDS+= databases/postgresql
  26. WANTLIB += pq>=2
  27. CONFIGURE_ARGS+= --enable-pgsql \
  28. --with-pgsql-includes="${LOCALBASE}/include/postgresql/"
  29. .else
  30. CONFIGURE_ARGS+= --disable-pgsql
  31. .endif
  32. .if ${FLAVOR:Mmysql}
  33. LIB_DEPENDS+= databases/mariadb
  34. WANTLIB += lib/mysql/mysqlclient ${LIBCXX}
  35. CONFIGURE_ARGS+= --enable-mysql
  36. .else
  37. CONFIGURE_ARGS+= --disable-mysql
  38. .endif
  39. post-install:
  40. ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/pmacct
  41. ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/pmacct/sql
  42. ${INSTALL_DATA} ${WRKSRC}/{CONFIG-KEYS,FAQS,QUICKSTART,TOOLS,UPGRADE} \
  43. ${PREFIX}/share/doc/pmacct/
  44. ${INSTALL_DATA} ${WRKSRC}/docs/* ${PREFIX}/share/doc/pmacct/
  45. cp -r ${WRKSRC}/examples/* ${PREFIX}/share/examples/pmacct/
  46. chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/examples/pmacct/
  47. chmod -R a+rX ${PREFIX}/share/examples/pmacct/
  48. ${INSTALL_DATA} ${WRKSRC}/sql/README* ${PREFIX}/share/doc/pmacct/
  49. ${INSTALL_DATA} `find ${WRKSRC}/sql -type f \! -name README*` \
  50. ${PREFIX}/share/examples/pmacct/sql/
  51. .include <bsd.port.mk>