Browse Source

libnet: add package

Signed-off-by: Mislav Novakovic <mislav.novakovic@sartura.hr>
Mislav Novakovic 9 years ago
parent
commit
235168192d
1 changed files with 70 additions and 0 deletions
  1. 70
    0
      libs/libnet-1.2.x/Makefile

+ 70
- 0
libs/libnet-1.2.x/Makefile View File

@@ -0,0 +1,70 @@
1
+#
2
+# Copyright (C) 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:=libnet
11
+PKG_VERSION:=1.2-rc3
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15
+PKG_SOURCE_URL:=http://sourceforge.net/projects/libnet-dev/files/
16
+PKG_MD5SUM:=f051e6e5bdecddb90f77c701c2ca1804
17
+PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
18
+
19
+PKG_FIXUP:=autoreconf
20
+PKG_INSTALL:=1
21
+
22
+include $(INCLUDE_DIR)/package.mk
23
+
24
+TARGET_CFLAGS += $(FPIC)
25
+
26
+define Package/libnet-1.2.x
27
+ SECTION:=libs
28
+ CATEGORY:=Libraries
29
+ DEPENDS:=+libpcap
30
+ TITLE:=Low-level packet creation library
31
+endef
32
+
33
+
34
+CONFIGURE_ARGS += \
35
+	--enable-shared \
36
+	--enable-static
37
+
38
+CONFIGURE_VARS += \
39
+	ac_cv_libnet_endianess=$(ENDIANESS) \
40
+	ac_libnet_have_pf_packet=yes \
41
+	LL_INT_TYPE=libnet_link_linux
42
+
43
+define Build/Configure
44
+	(cd $(PKG_BUILD_DIR); touch \
45
+	configure.in \
46
+	include.m4 \
47
+	aclocal.m4 \
48
+	Makefile.in \
49
+	);
50
+	$(call Build/Configure/Default)
51
+endef
52
+
53
+
54
+define Build/InstallDev
55
+	$(INSTALL_DIR) $(STAGING_DIR)/usr/lib/libnet-1.2.x/include
56
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/libnet.h $(STAGING_DIR)/usr/lib/libnet-1.2.x/include
57
+
58
+	$(INSTALL_DIR) $(STAGING_DIR)/usr/lib/libnet-1.2.x/include/libnet
59
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/libnet/libnet-*.h $(STAGING_DIR)/usr/lib/libnet-1.2.x/include/libnet
60
+
61
+	$(INSTALL_DIR) $(STAGING_DIR)/usr/lib/libnet-1.2.x/lib
62
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.{a,la,so*} $(STAGING_DIR)/usr/lib/libnet-1.2.x/lib
63
+endef
64
+
65
+define Package/libnet-1.2.x/install
66
+	$(INSTALL_DIR) $(1)/usr/lib
67
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.so* $(1)/usr/lib/
68
+endef
69
+
70
+$(eval $(call BuildPackage,libnet-1.2.x))