Makefile 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. include ${TOPDIR}/mk/package.mk
  33. $(eval $(call PKG_template,ULOGD,ulogd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  34. $(eval $(call PKG_template,ULOGD_MOD_MYSQL,ulogd-mod-mysql,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  35. $(eval $(call PKG_template,ULOGD_MOD_PCAP,ulogd-mod-pcap,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  36. $(eval $(call PKG_template,ULOGD_MOD_PGSQL,ulogd-mod-pgsql,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  37. $(eval $(call PKG_template,ULOGD_MOD_SQLITE,ulogd-mod-sqlite,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  38. $(eval $(call PKG_template,ULOGD_MOD_EXTRA,ulogd-mod-extra,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  39. SUB_INSTALLS-y:=
  40. SUB_INSTALLS-m:=
  41. SUB_INSTALLS-${ADK_PACKAGE_ULOGD_MOD_PCAP}+= ulogd-mod-pcap-install
  42. SUB_INSTALLS-${ADK_PACKAGE_ULOGD_MOD_MYSQL}+= ulogd-mod-mysql-install
  43. SUB_INSTALLS-${ADK_PACKAGE_ULOGD_MOD_PGSQL}+= ulogd-mod-pgsql-install
  44. SUB_INSTALLS-${ADK_PACKAGE_ULOGD_MOD_SQLITE}+= ulogd-mod-sqlite-install
  45. SUB_INSTALLS-${ADK_PACKAGE_ULOGD_MOD_EXTRA}+= ulogd-mod-extra-install
  46. CONFIGURE_STYLE:= gnu
  47. BUILD_STYLE:= auto
  48. INSTALL_STYLE:= auto
  49. ifneq (${ADK_PACKAGE_ULOGD_MOD_PCAP},)
  50. CONFIGURE_ENV+= ac_cv_header_pcap_h=yes
  51. else
  52. CONFIGURE_ENV+= ac_cv_header_pcap_h=no
  53. endif
  54. ifneq (${ADK_PACKAGE_ULOGD_MOD_MYSQL},)
  55. CONFIGURE_ARGS+= --with-mysql=${STAGING_DIR}/usr
  56. endif
  57. ifneq (${ADK_PACKAGE_ULOGD_MOD_PGSQL},)
  58. CONFIGURE_ARGS+= --with-pgsql=${STAGING_DIR}/usr
  59. endif
  60. ifneq (${ADK_PACKAGE_ULOGD_MOD_SQLITE},)
  61. CONFIGURE_ARGS+= --with-sqlite3=${STAGING_DIR}/usr
  62. endif
  63. post-install: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y}
  64. ${INSTALL_DIR} ${IDIR_ULOGD}/usr/sbin ${IDIR_ULOGD}/usr/lib/ulogd/
  65. ${INSTALL_DIR} ${IDIR_ULOGD}/etc
  66. ${INSTALL_DATA} ${WRKINST}/etc/ulogd.conf ${IDIR_ULOGD}/etc/
  67. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_BASE.so ${IDIR_ULOGD}/usr/lib/ulogd/
  68. ${INSTALL_BIN} ${WRKINST}/usr/sbin/ulogd ${IDIR_ULOGD}/usr/sbin/
  69. ulogd-mod-extra-install:
  70. ${INSTALL_DIR} ${IDIR_ULOGD_MOD_EXTRA}/usr/lib/ulogd
  71. ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_{LOCAL,LOGEMU,OPRINT,PWSNIFF,SYSLOG}.so \
  72. ${IDIR_ULOGD_MOD_EXTRA}/usr/lib/ulogd
  73. ulogd-mod-pcap-install:
  74. ${INSTALL_DIR} ${IDIR_ULOGD_MOD_PCAP}/usr/lib/ulogd
  75. ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_PCAP.so \
  76. ${IDIR_ULOGD_MOD_PCAP}/usr/lib/ulogd
  77. ulogd-mod-sqlite-install:
  78. ${INSTALL_DIR} ${IDIR_ULOGD_MOD_SQLITE}/usr/lib/ulogd
  79. ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_SQLITE3.so \
  80. ${IDIR_ULOGD_MOD_SQLITE}/usr/lib/ulogd
  81. ulogd-mod-pgsql-install:
  82. ${INSTALL_DIR} ${IDIR_ULOGD_MOD_PGSQL}/usr/lib/ulogd
  83. ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_PGSQL.so \
  84. ${IDIR_ULOGD_MOD_PGSQL}/usr/lib/ulogd
  85. ulogd-mod-mysql-install:
  86. ${INSTALL_DIR} ${IDIR_ULOGD_MOD_MYSQL}/usr/lib/ulogd
  87. ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_MYSQL.so \
  88. ${IDIR_ULOGD_MOD_MYSQL}/usr/lib/ulogd
  89. include ${TOPDIR}/mk/pkg-bottom.mk