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