noddos: Don't create /var/lib/noddos in Noddos OpenWRT/Lede Makefile
[feed/packages.git] / libs / libdnet / Makefile
1 #
2 # Copyright (C) 2006-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:=libdnet
11 PKG_VERSION:=1.12
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://github.com/dugsong/libdnet/archive
16 PKG_MD5SUM:=d2f1b72eac2a1070959667e9e61dcf20
17
18 PKG_FIXUP:=autoreconf
19 PKG_INSTALL:=1
20
21 PKG_LICENSE:=BSD
22 PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
23
24 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/libdnet
29 SECTION:=libs
30 CATEGORY:=Libraries
31 TITLE:=Low-level network library
32 URL:=http://sourceforge.net/projects/libdnet/
33 endef
34
35 define Package/libdnet/description
36 libdnet is a library of simplified, portable interface to several low-level
37 networking routines.
38 endef
39
40 TARGET_CFLAGS += $(FPIC)
41
42 CONFIGURE_ARGS += \
43 --enable-shared \
44 --enable-static \
45 --without-check \
46 --without-python
47
48 CONFIGURE_VARS += \
49 ac_cv_dnet_bsd_bpf=no
50
51 MAKE_FLAGS += \
52 CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
53
54 define Build/InstallDev
55 $(INSTALL_DIR) $(2)/bin
56 $(INSTALL_BIN) \
57 $(PKG_INSTALL_DIR)/usr/bin/dnet-config \
58 $(2)/bin/
59 $(SED) \
60 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
61 $(2)/bin/dnet-config
62
63 $(INSTALL_DIR) $(1)/usr/include
64 $(INSTALL_DATA)\
65 $(PKG_INSTALL_DIR)/usr/include/dnet.h \
66 $(1)/usr/include/
67 $(CP) \
68 $(PKG_INSTALL_DIR)/usr/include/dnet \
69 $(1)/usr/include/
70
71 $(INSTALL_DIR) $(1)/usr/lib
72 $(CP) \
73 $(PKG_INSTALL_DIR)/usr/lib/libdnet.{la,a,so*} \
74 $(1)/usr/lib/
75 endef
76
77 define Package/libdnet/install
78 $(INSTALL_DIR) $(1)/usr/lib
79 $(CP) \
80 $(PKG_INSTALL_DIR)/usr/lib/libdnet.so.* \
81 $(1)/usr/lib/
82
83 $(INSTALL_DIR) $(1)/usr/sbin
84 $(INSTALL_BIN) \
85 $(PKG_INSTALL_DIR)/usr/sbin/dnet \
86 $(1)/usr/sbin/
87 endef
88
89 $(eval $(call BuildPackage,libdnet))