瀏覽代碼

libdaq: initial import from old-packages

Signed-off-by: Luka Perkov <luka@openwrt.org>
Luka Perkov 10 年之前
父節點
當前提交
ab1c7a43e3
共有 2 個檔案被更改,包括 91 行新增0 行删除
  1. 73
    0
      libs/libdaq/Makefile
  2. 18
    0
      libs/libdaq/patches/001-compile.patch

+ 73
- 0
libs/libdaq/Makefile 查看文件

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

+ 18
- 0
libs/libdaq/patches/001-compile.patch 查看文件

@@ -0,0 +1,18 @@
1
+--- daq-1.1.1/configure	2012-07-10 21:32:51.000000000 +0200
2
++++ daq-new/configure	2012-08-03 15:47:07.654945651 +0200
3
+@@ -12717,10 +12717,11 @@
4
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libpcap version >= \"1.0.0\"" >&5
5
+ $as_echo_n "checking for libpcap version >= \"1.0.0\"... " >&6; }
6
+     if test "$cross_compiling" = yes; then :
7
+-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9
+-as_fn_error $? "cannot run test program while cross compiling
10
+-See \`config.log' for more details" "$LINENO" 5; }
11
++#  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12
++#$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13
++#as_fn_error $? "cannot run test program while cross compiling
14
++#See \`config.log' for more details" "$LINENO" 5; }
15
++        echo "    No cross compiling test."
16
+ else
17
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18
+ /* end confdefs.h.  */