Makefile 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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 ${ADK_TOPDIR}/rules.mk
  4. PKG_NAME:= ulogd
  5. PKG_VERSION:= 2.0.4
  6. PKG_RELEASE:= 1
  7. PKG_HASH:= 56b30a13a8832e97178f39b7bb173a0b1dfe173dbb60d99a1a386c0962a2effd
  8. PKG_DESCR:= netfilter userspace logging daemon
  9. PKG_SECTION:= net/firewall
  10. PKG_DEPENDS:= iptables libnetfilter-conntrack libnetfilter-log libnetfilter-acct libmnl
  11. PKG_BUILDDEP:= iptables libnetfilter_conntrack libnetfilter_log libnetfilter_acct libmnl
  12. PKG_URL:= http://www.netfilter.org/projects/ulogd/
  13. PKG_SITES:= http://www.netfilter.org/projects/ulogd/files/
  14. PKG_NOPARALLEL:= 1
  15. PKG_SUBPKGS:= ULOGD ULOGD_MOD_MYSQL ULOGD_MOD_PCAP ULOGD_MOD_PGSQL ULOGD_MOD_SQLITE
  16. PKGSD_ULOGD_MOD_MYSQL:= MySQL plugin for ulogd
  17. PKGSB_ULOGD_MOD_MYSQL:= mysql
  18. PKGSS_ULOGD_MOD_MYSQL:= zlib libmysqlclient
  19. PKGSN_ULOGD_MOD_MYSQL:= ulogd
  20. PKGSD_ULOGD_MOD_PGSQL:= PostgreSQL plugin for ulogd
  21. PKGSB_ULOGD_MOD_PGSQL:= postgresql
  22. PKGSS_ULOGD_MOD_PGSQL:= libpq
  23. PKGSN_ULOGD_MOD_PGSQL:= ulogd
  24. PKGSD_ULOGD_MOD_SQLITE:= sqlite plugin for ulogd
  25. PKGSB_ULOGD_MOD_SQLITE:= sqlite
  26. PKGSS_ULOGD_MOD_SQLITE:= libsqlite
  27. PKGSN_ULOGD_MOD_SQLITE:= ulogd
  28. PKGSD_ULOGD_MOD_PCAP:= libpcap plugin for ulogd
  29. PKGSB_ULOGD_MOD_PCAP:= libpcap
  30. PKGSS_ULOGD_MOD_PCAP:= libpcap
  31. PKGSN_ULOGD_MOD_PCAP:= ulogd
  32. PKG_HOST_DEPENDS:= !cygwin
  33. DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
  34. include ${ADK_TOPDIR}/mk/package.mk
  35. $(eval $(call PKG_template,ULOGD,ulogd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  36. $(eval $(call PKG_template,ULOGD_MOD_MYSQL,ulogd-mod-mysql,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_ULOGD_MOD_MYSQL},${PKGSD_ULOGD_MOD_MYSQL},${PKG_SECTION}))
  37. $(eval $(call PKG_template,ULOGD_MOD_PCAP,ulogd-mod-pcap,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_ULOGD_MOD_PCAP},${PKGSD_ULOGD_MOD_PCAP},${PKG_SECTION}))
  38. $(eval $(call PKG_template,ULOGD_MOD_PGSQL,ulogd-mod-pgsql,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_ULOGD_MOD_PGSQL},${PKGSD_ULOGD_MOD_PGSQL},${PKG_SECTION}))
  39. $(eval $(call PKG_template,ULOGD_MOD_SQLITE,ulogd-mod-sqlite,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_ULOGD_MOD_SQLITE},${PKGSD_ULOGD_MOD_SQLITE},${PKG_SECTION}))
  40. AUTOTOOL_STYLE:= autoreconf
  41. TARGET_CPPFLAGS+= -D_GNU_SOURCE
  42. TARGET_CFLAGS+= -fPIC
  43. ifneq (${ADK_PACKAGE_ULOGD_MOD_MYSQL},)
  44. CONFIGURE_ARGS+= --with-mysql=${STAGING_TARGET_DIR}/usr
  45. else
  46. CONFIGURE_ARGS+= --without-mysql
  47. endif
  48. ifneq (${ADK_PACKAGE_ULOGD_MOD_PGSQL},)
  49. CONFIGURE_ARGS+= --with-pgsql=${STAGING_TARGET_DIR}/usr
  50. else
  51. CONFIGURE_ARGS+= --without-pgsql
  52. endif
  53. ulogd-install:
  54. ${INSTALL_DIR} ${IDIR_ULOGD}/etc
  55. ${INSTALL_DATA} ${WRKBUILD}/ulogd.conf ${IDIR_ULOGD}/etc
  56. ${INSTALL_DIR} ${IDIR_ULOGD}/usr/sbin ${IDIR_ULOGD}/usr/lib/ulogd/
  57. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_raw2packet_BASE.so \
  58. ${IDIR_ULOGD}/usr/lib/ulogd/
  59. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_filter_HWHDR.so \
  60. ${IDIR_ULOGD}/usr/lib/ulogd/
  61. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_filter_IFINDEX.so \
  62. ${IDIR_ULOGD}/usr/lib/ulogd/
  63. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_filter_IP2BIN.so \
  64. ${IDIR_ULOGD}/usr/lib/ulogd/
  65. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_filter_IP2HBIN.so \
  66. ${IDIR_ULOGD}/usr/lib/ulogd/
  67. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_filter_IP2STR.so \
  68. ${IDIR_ULOGD}/usr/lib/ulogd/
  69. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_filter_MARK.so \
  70. ${IDIR_ULOGD}/usr/lib/ulogd/
  71. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_filter_PRINTFLOW.so \
  72. ${IDIR_ULOGD}/usr/lib/ulogd/
  73. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_filter_PRINTPKT.so \
  74. ${IDIR_ULOGD}/usr/lib/ulogd/
  75. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_filter_PWSNIFF.so \
  76. ${IDIR_ULOGD}/usr/lib/ulogd/
  77. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_inpflow_NFACCT.so \
  78. ${IDIR_ULOGD}/usr/lib/ulogd/
  79. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_inpflow_NFCT.so \
  80. ${IDIR_ULOGD}/usr/lib/ulogd/
  81. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_inppkt_NFLOG.so \
  82. ${IDIR_ULOGD}/usr/lib/ulogd/
  83. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_inppkt_ULOG.so \
  84. ${IDIR_ULOGD}/usr/lib/ulogd/
  85. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_inppkt_UNIXSOCK.so \
  86. ${IDIR_ULOGD}/usr/lib/ulogd/
  87. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_output_GPRINT.so \
  88. ${IDIR_ULOGD}/usr/lib/ulogd/
  89. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_output_GRAPHITE.so \
  90. ${IDIR_ULOGD}/usr/lib/ulogd/
  91. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_output_LOGEMU.so \
  92. ${IDIR_ULOGD}/usr/lib/ulogd/
  93. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_output_NACCT.so \
  94. ${IDIR_ULOGD}/usr/lib/ulogd/
  95. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_output_OPRINT.so \
  96. ${IDIR_ULOGD}/usr/lib/ulogd/
  97. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_output_SYSLOG.so \
  98. ${IDIR_ULOGD}/usr/lib/ulogd/
  99. ${INSTALL_BIN} ${WRKINST}/usr/lib/ulogd/ulogd_output_XML.so \
  100. ${IDIR_ULOGD}/usr/lib/ulogd/
  101. ${INSTALL_BIN} ${WRKINST}/usr/sbin/ulogd ${IDIR_ULOGD}/usr/sbin
  102. ulogd-mod-pcap-install:
  103. ${INSTALL_DIR} ${IDIR_ULOGD_MOD_PCAP}/usr/lib/ulogd
  104. ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_output_PCAP.so \
  105. ${IDIR_ULOGD_MOD_PCAP}/usr/lib/ulogd
  106. ulogd-mod-sqlite-install:
  107. ${INSTALL_DIR} ${IDIR_ULOGD_MOD_SQLITE}/usr/lib/ulogd
  108. ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_output_SQLITE3.so \
  109. ${IDIR_ULOGD_MOD_SQLITE}/usr/lib/ulogd
  110. ulogd-mod-pgsql-install:
  111. ${INSTALL_DIR} ${IDIR_ULOGD_MOD_PGSQL}/usr/lib/ulogd
  112. ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_output_PGSQL.so \
  113. ${IDIR_ULOGD_MOD_PGSQL}/usr/lib/ulogd
  114. ulogd-mod-mysql-install:
  115. ${INSTALL_DIR} ${IDIR_ULOGD_MOD_MYSQL}/usr/lib/ulogd
  116. ${CP} ${WRKINST}/usr/lib/ulogd/ulogd_output_MYSQL.so \
  117. ${IDIR_ULOGD_MOD_MYSQL}/usr/lib/ulogd
  118. include ${ADK_TOPDIR}/mk/pkg-bottom.mk