1
0

Makefile 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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:=2
  11. PKG_SOURCE_URL:=https://www.snort.org/downloads/snort/ \
  12. @SF/snort
  13. PKG_SOURCE:=daq-$(PKG_VERSION).tar.gz
  14. PKG_MD5SUM:=65e51d72e9d5d8b397e192e4e5857eff
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/daq-$(PKG_VERSION)
  16. PKG_LICENSE:=GPL-2.0
  17. PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/nls.mk
  20. define Package/libdaq
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. TITLE:=DAQ library
  24. URL:=$(PKG_SOURCE_URL)
  25. DEPENDS:=+libdnet +libpcap
  26. endef
  27. define Package/libdaq/description
  28. Data Acquisition library for packet I/O.
  29. endef
  30. CONFIGURE_ARGS+= \
  31. --disable-static \
  32. --disable-nfq-module \
  33. --with-dnet-includes="$(STAGING_DIR)/usr/include" \
  34. --with-dnet-libraries="$(STAGING_DIR)/usr/lib" \
  35. --with-libpcap-includes="$(STAGING_DIR)/usr/include" \
  36. --with-libpcap-libraries="$(STAGING_DIR)/usr/lib" \
  37. define Build/Compile
  38. $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)
  39. endef
  40. define Build/Install
  41. $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR) install DESTDIR=$(PKG_INSTALL_DIR)
  42. endef
  43. define Build/InstallDev
  44. $(INSTALL_DIR) $(STAGING_DIR)/usr/include
  45. $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(STAGING_DIR)/usr/include/
  46. $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
  47. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(STAGING_DIR)/usr/lib/
  48. $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/daq
  49. $(CP) $(PKG_INSTALL_DIR)/usr/lib/daq/* $(STAGING_DIR)/usr/lib/daq/
  50. $(INSTALL_DIR) $(STAGING_DIR)/usr/bin
  51. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/daq-modules-config $(STAGING_DIR)/usr/bin/
  52. endef
  53. define Package/libdaq/install
  54. $(INSTALL_DIR) $(1)/usr/lib
  55. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  56. $(INSTALL_DIR) $(1)/usr/lib/daq
  57. $(CP) $(PKG_INSTALL_DIR)/usr/lib/daq/*.so* $(1)/usr/lib/daq/
  58. $(INSTALL_DIR) $(1)/usr/bin
  59. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/daq-modules-config $(1)/usr/bin/
  60. endef
  61. $(eval $(call BuildPackage,libdaq))