Makefile 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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:= 1.24
  6. PKG_RELEASE:= 7
  7. PKG_MD5SUM:= 05b4ed2926b9a22aaeaf642917bbf8ff
  8. PKG_DESCR:= Netfilter userspace logging daemon
  9. PKG_SECTION:= net
  10. PKG_MULTI:= 1
  11. PKG_NOPARALLEL:= 1
  12. PKG_DEPENDS:= iptables
  13. PKG_BUILDDEP+= iptables
  14. ifneq ($(ADK_PACKAGE_ULOGD_MOD_MYSQL),)
  15. PKG_BUILDDEP+= mysql
  16. endif
  17. ifneq ($(ADK_PACKAGE_ULOGD_MOD_PCAP),)
  18. PKG_BUILDDEP+= libpcap
  19. endif
  20. ifneq ($(ADK_PACKAGE_ULOGD_MOD_PGSQL),)
  21. PKG_BUILDDEP+= postgresql
  22. endif
  23. ifneq ($(ADK_PACKAGE_ULOGD_MOD_SQLITE),)
  24. PKG_BUILDDEP+= sqlite
  25. endif
  26. PKG_URL:= http://www.netfilter.org/projects/ulogd
  27. PKG_SITES:= ftp://ftp.netfilter.org/pub/ulogd/ \
  28. ftp://ftp.be.netfilter.org/pub/netfilter/ulogd/ \
  29. ftp://ftp.de.netfilter.org/pub/netfilter/ulogd/ \
  30. ftp://ftp.no.netfilter.org/pub/netfilter/ulogd/
  31. DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
  32. PKG_HOST_DEPENDS:= !cygwin
  33. include ${TOPDIR}/mk/package.mk
  34. $(eval $(call PKG_template,ULOGD,ulogd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  35. $(eval $(call PKG_template,ULOGD_MOD_MYSQL,ulogd-mod-mysql,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  36. $(eval $(call PKG_template,ULOGD_MOD_PCAP,ulogd-mod-pcap,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  37. $(eval $(call PKG_template,ULOGD_MOD_PGSQL,ulogd-mod-pgsql,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  38. $(eval $(call PKG_template,ULOGD_MOD_SQLITE,ulogd-mod-sqlite,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  39. $(eval $(call PKG_template,ULOGD_MOD_EXTRA,ulogd-mod-extra,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  40. SUB_INSTALLS-y:=
  41. SUB_INSTALLS-m:=
  42. SUB_INSTALLS-${ADK_PACKAGE_ULOGD_MOD_PCAP}+= ulogd-mod-pcap-install
  43. SUB_INSTALLS-${ADK_PACKAGE_ULOGD_MOD_MYSQL}+= ulogd-mod-mysql-install
  44. SUB_INSTALLS-${ADK_PACKAGE_ULOGD_MOD_PGSQL}+= ulogd-mod-pgsql-install
  45. SUB_INSTALLS-${ADK_PACKAGE_ULOGD_MOD_SQLITE}+= ulogd-mod-sqlite-install
  46. SUB_INSTALLS-${ADK_PACKAGE_ULOGD_MOD_EXTRA}+= ulogd-mod-extra-install
  47. CONFIGURE_STYLE:= gnu
  48. BUILD_STYLE:= auto
  49. INSTALL_STYLE:= auto
  50. ifneq (${ADK_PACKAGE_ULOGD_MOD_PCAP},)
  51. CONFIGURE_ENV+= ac_cv_header_pcap_h=yes
  52. else
  53. CONFIGURE_ENV+= ac_cv_header_pcap_h=no
  54. endif
  55. ifneq (${ADK_PACKAGE_ULOGD_MOD_MYSQL},)
  56. CONFIGURE_ARGS+= --with-mysql=${STAGING_DIR}/usr
  57. endif
  58. ifneq (${ADK_PACKAGE_ULOGD_MOD_PGSQL},)
  59. CONFIGURE_ARGS+= --with-pgsql=${STAGING_DIR}/usr
  60. endif
  61. ifneq (${ADK_PACKAGE_ULOGD_MOD_SQLITE},)
  62. CONFIGURE_ARGS+= --with-sqlite3=${STAGING_DIR}/usr
  63. endif
  64. post-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y}
  65. ${INSTALL_DIR} ${IDIR_ULOGD}/usr/sbin ${IDIR_ULOGD}/usr/lib/ulogd/
  66. ${INSTALL_DIR} ${IDIR_ULOGD}/etc
  67. ${INSTALL_DATA} ${WRKINST}/etc/ulogd.conf ${IDIR_ULOGD}/etc/
  68. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_BASE.so ${IDIR_ULOGD}/usr/lib/ulogd/
  69. ${INSTALL_BIN} ${WRKINST}/usr/sbin/ulogd ${IDIR_ULOGD}/usr/sbin/
  70. ulogd-mod-extra-install:
  71. ${INSTALL_DIR} ${IDIR_ULOGD_MOD_EXTRA}/usr/lib/ulogd
  72. ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_{LOCAL,LOGEMU,OPRINT,PWSNIFF,SYSLOG}.so \
  73. ${IDIR_ULOGD_MOD_EXTRA}/usr/lib/ulogd
  74. ulogd-mod-pcap-install:
  75. ${INSTALL_DIR} ${IDIR_ULOGD_MOD_PCAP}/usr/lib/ulogd
  76. ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_PCAP.so \
  77. ${IDIR_ULOGD_MOD_PCAP}/usr/lib/ulogd
  78. ulogd-mod-sqlite-install:
  79. ${INSTALL_DIR} ${IDIR_ULOGD_MOD_SQLITE}/usr/lib/ulogd
  80. ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_SQLITE3.so \
  81. ${IDIR_ULOGD_MOD_SQLITE}/usr/lib/ulogd
  82. ulogd-mod-pgsql-install:
  83. ${INSTALL_DIR} ${IDIR_ULOGD_MOD_PGSQL}/usr/lib/ulogd
  84. ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_PGSQL.so \
  85. ${IDIR_ULOGD_MOD_PGSQL}/usr/lib/ulogd
  86. ulogd-mod-mysql-install:
  87. ${INSTALL_DIR} ${IDIR_ULOGD_MOD_MYSQL}/usr/lib/ulogd
  88. ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_MYSQL.so \
  89. ${IDIR_ULOGD_MOD_MYSQL}/usr/lib/ulogd
  90. include ${TOPDIR}/mk/pkg-bottom.mk