You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
2.0 KiB

  1. #
  2. # Copyright (C) 2012-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libdaq
  9. PKG_VERSION:=2.0.4
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_URL:=https://www.snort.org/downloads/snort/
  12. PKG_SOURCE:=daq-$(PKG_VERSION).tar.gz
  13. PKG_MD5SUM:=65e51d72e9d5d8b397e192e4e5857eff
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/daq-$(PKG_VERSION)
  15. PKG_LICENSE:=GPL-2.0
  16. PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/nls.mk
  19. define Package/libdaq
  20. SECTION:=libs
  21. CATEGORY:=Libraries
  22. TITLE:=DAQ library
  23. URL:=$(PKG_SOURCE_URL)
  24. DEPENDS:=+libdnet +libpcap
  25. endef
  26. define Package/libdaq/description
  27. Data Acquisition library for packet I/O.
  28. endef
  29. CONFIGURE_ARGS+= \
  30. --disable-static \
  31. --disable-nfq-module \
  32. --with-dnet-includes="$(STAGING_DIR)/usr/include" \
  33. --with-dnet-libraries="$(STAGING_DIR)/usr/lib" \
  34. --with-libpcap-includes="$(STAGING_DIR)/usr/include" \
  35. --with-libpcap-libraries="$(STAGING_DIR)/usr/lib" \
  36. define Build/Compile
  37. $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)
  38. endef
  39. define Build/Install
  40. $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR) install DESTDIR=$(PKG_INSTALL_DIR)
  41. endef
  42. define Build/InstallDev
  43. $(INSTALL_DIR) $(STAGING_DIR)/usr/include
  44. $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(STAGING_DIR)/usr/include/
  45. $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
  46. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(STAGING_DIR)/usr/lib/
  47. $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/daq
  48. $(CP) $(PKG_INSTALL_DIR)/usr/lib/daq/* $(STAGING_DIR)/usr/lib/daq/
  49. $(INSTALL_DIR) $(STAGING_DIR)/usr/bin
  50. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/daq-modules-config $(STAGING_DIR)/usr/bin/
  51. endef
  52. define Package/libdaq/install
  53. $(INSTALL_DIR) $(1)/usr/lib
  54. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  55. $(INSTALL_DIR) $(1)/usr/lib/daq
  56. $(CP) $(PKG_INSTALL_DIR)/usr/lib/daq/*.so* $(1)/usr/lib/daq/
  57. $(INSTALL_DIR) $(1)/usr/bin
  58. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/daq-modules-config $(1)/usr/bin/
  59. endef
  60. $(eval $(call BuildPackage,libdaq))