Makefile 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include ${TOPDIR}/rules.mk
  4. PKG_NAME:= ulogd
  5. PKG_VERSION:= 2.0.0beta3
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= be8137d3b7ae70ebbce7ca8852b9e901
  8. PKG_DESCR:= Netfilter userspace logging daemon
  9. PKG_SECTION:= firewall
  10. PKG_MULTI:= 1
  11. PKG_NOPARALLEL:= 1
  12. PKG_DEPENDS:= iptables libnetfilter-conntrack libnetfilter-log
  13. PKG_BUILDDEP+= iptables libnetfilter_conntrack libnetfilter_log
  14. ifneq ($(ADK_PACKAGE_ULOGD_MOD_MYSQL),)
  15. PKG_BUILDDEP+= mysql
  16. endif
  17. ifneq ($(ADK_PACKAGE_ULOGD_MOD_PGSQL),)
  18. PKG_BUILDDEP+= postgresql
  19. endif
  20. ifneq ($(ADK_PACKAGE_ULOGD_MOD_SQLITE),)
  21. PKG_BUILDDEP+= sqlite
  22. endif
  23. PKG_URL:= http://www.netfilter.org/projects/ulogd/
  24. PKG_SITES:= http://www.netfilter.org/projects/ulogd/files/
  25. DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
  26. PKG_HOST_DEPENDS:= !cygwin
  27. include ${TOPDIR}/mk/package.mk
  28. $(eval $(call PKG_template,ULOGD,ulogd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  29. $(eval $(call PKG_template,ULOGD_MOD_MYSQL,ulogd-mod-mysql,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  30. $(eval $(call PKG_template,ULOGD_MOD_PCAP,ulogd-mod-pcap,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  31. $(eval $(call PKG_template,ULOGD_MOD_PGSQL,ulogd-mod-pgsql,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  32. $(eval $(call PKG_template,ULOGD_MOD_SQLITE,ulogd-mod-sqlite,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  33. $(eval $(call PKG_template,ULOGD_MOD_EXTRA,ulogd-mod-extra,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  34. SUB_INSTALLS-y:=
  35. SUB_INSTALLS-m:=
  36. SUB_INSTALLS-${ADK_PACKAGE_ULOGD_MOD_MYSQL}+= ulogd-mod-mysql-install
  37. SUB_INSTALLS-${ADK_PACKAGE_ULOGD_MOD_PGSQL}+= ulogd-mod-pgsql-install
  38. SUB_INSTALLS-${ADK_PACKAGE_ULOGD_MOD_SQLITE}+= ulogd-mod-sqlite-install
  39. SUB_INSTALLS-${ADK_PACKAGE_ULOGD_MOD_EXTRA}+= ulogd-mod-extra-install
  40. TCFLAGS+= -fPIC
  41. ifneq (${ADK_PACKAGE_ULOGD_MOD_MYSQL},)
  42. CONFIGURE_ARGS+= --with-mysql=${STAGING_DIR}/usr
  43. endif
  44. ifneq (${ADK_PACKAGE_ULOGD_MOD_PGSQL},)
  45. CONFIGURE_ARGS+= --with-pgsql=${STAGING_DIR}/usr
  46. endif
  47. ifneq (${ADK_PACKAGE_ULOGD_MOD_SQLITE},)
  48. CONFIGURE_ARGS+= --with-sqlite3=${STAGING_DIR}/usr
  49. endif
  50. post-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y}
  51. ${INSTALL_DIR} ${IDIR_ULOGD}/usr/sbin ${IDIR_ULOGD}/usr/lib/ulogd/
  52. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_raw2packet_BASE.so \
  53. ${IDIR_ULOGD}/usr/lib/ulogd/
  54. ${INSTALL_BIN} ${WRKINST}/usr/sbin/ulogd ${IDIR_ULOGD}/usr/sbin/
  55. ulogd-mod-extra-install:
  56. ${INSTALL_DIR} ${IDIR_ULOGD_MOD_EXTRA}/usr/lib/ulogd
  57. ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_output_{LOGEMU,OPRINT,SYSLOG}.so \
  58. ${IDIR_ULOGD_MOD_EXTRA}/usr/lib/ulogd
  59. ulogd-mod-sqlite-install:
  60. ${INSTALL_DIR} ${IDIR_ULOGD_MOD_SQLITE}/usr/lib/ulogd
  61. ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_output_SQLITE3.so \
  62. ${IDIR_ULOGD_MOD_SQLITE}/usr/lib/ulogd
  63. ulogd-mod-pgsql-install:
  64. ${INSTALL_DIR} ${IDIR_ULOGD_MOD_PGSQL}/usr/lib/ulogd
  65. ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_output_PGSQL.so \
  66. ${IDIR_ULOGD_MOD_PGSQL}/usr/lib/ulogd
  67. ulogd-mod-mysql-install:
  68. ${INSTALL_DIR} ${IDIR_ULOGD_MOD_MYSQL}/usr/lib/ulogd
  69. ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_output_MYSQL.so \
  70. ${IDIR_ULOGD_MOD_MYSQL}/usr/lib/ulogd
  71. include ${TOPDIR}/mk/pkg-bottom.mk