Makefile 5.5 KB

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