Makefile 5.6 KB

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