Merge pull request #912 from Shulyaka/master
[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).tgz
15 PKG_SOURCE_URL:=http://libdnet.googlecode.com/files/
16 PKG_MD5SUM:=9253ef6de1b5e28e9c9a62b882e44cc9
17
18 PKG_FIXUP:=autoreconf
19 PKG_INSTALL:=1
20
21 PKG_LICENSE:=BSD
22 PKG_MAINTAINER:=Luka Perkov <luka@openwrt.org>
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/libdnet
27 SECTION:=libs
28 CATEGORY:=Libraries
29 TITLE:=Low-level network library
30 URL:=http://sourceforge.net/projects/libdnet/
31 endef
32
33 define Package/libdnet/description
34 libdnet is a library of simplified, portable interface to several low-level
35 networking routines.
36 endef
37
38 TARGET_CFLAGS += $(FPIC)
39
40 CONFIGURE_ARGS += \
41 --enable-shared \
42 --enable-static \
43 --without-check \
44 --without-python
45
46 CONFIGURE_VARS += \
47 ac_cv_dnet_bsd_bpf=no
48
49 MAKE_FLAGS += \
50 CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
51
52 define Build/InstallDev
53 $(INSTALL_DIR) $(2)/bin
54 $(INSTALL_BIN) \
55 $(PKG_INSTALL_DIR)/usr/bin/dnet-config \
56 $(2)/bin/
57 $(SED) \
58 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
59 $(2)/bin/dnet-config
60
61 $(INSTALL_DIR) $(1)/usr/include
62 $(INSTALL_DATA)\
63 $(PKG_INSTALL_DIR)/usr/include/dnet.h \
64 $(1)/usr/include/
65 $(CP) \
66 $(PKG_INSTALL_DIR)/usr/include/dnet \
67 $(1)/usr/include/
68
69 $(INSTALL_DIR) $(1)/usr/lib
70 $(CP) \
71 $(PKG_INSTALL_DIR)/usr/lib/libdnet.{la,a,so*} \
72 $(1)/usr/lib/
73 endef
74
75 define Package/libdnet/install
76 $(INSTALL_DIR) $(1)/usr/lib
77 $(CP) \
78 $(PKG_INSTALL_DIR)/usr/lib/libdnet.so.* \
79 $(1)/usr/lib/
80
81 $(INSTALL_DIR) $(1)/usr/sbin
82 $(INSTALL_BIN) \
83 $(PKG_INSTALL_DIR)/usr/sbin/dnet \
84 $(1)/usr/sbin/
85 endef
86
87 $(eval $(call BuildPackage,libdnet))