2 # Copyright (C) 2006-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=https
://github.com
/dugsong
/libdnet
/archive
16 PKG_MD5SUM
:=d2f1b72eac2a1070959667e9e61dcf20
22 PKG_MAINTAINER
:=Luka Perkov
<luka@openwrt.org
>
24 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_NAME
)-$(PKG_VERSION
)
26 include $(INCLUDE_DIR
)/package.mk
28 define Package
/libdnet
31 TITLE
:=Low-level network library
32 URL
:=http
://sourceforge.net
/projects
/libdnet
/
35 define Package
/libdnet
/description
36 libdnet is a library of simplified
, portable interface to several low-level
40 TARGET_CFLAGS
+= $(FPIC
)
52 CFLAGS
="$(TARGET_CFLAGS) -D_GNU_SOURCE"
54 define Build
/InstallDev
55 $(INSTALL_DIR
) $(2)/bin
57 $(PKG_INSTALL_DIR
)/usr
/bin
/dnet-config \
60 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
63 $(INSTALL_DIR
) $(1)/usr
/include
65 $(PKG_INSTALL_DIR
)/usr
/include/dnet.h \
68 $(PKG_INSTALL_DIR
)/usr
/include/dnet \
71 $(INSTALL_DIR
) $(1)/usr
/lib
73 $(PKG_INSTALL_DIR
)/usr
/lib
/libdnet.
{la
,a
,so
*} \
77 define Package
/libdnet
/install
78 $(INSTALL_DIR
) $(1)/usr
/lib
80 $(PKG_INSTALL_DIR
)/usr
/lib
/libdnet.so.
* \
83 $(INSTALL_DIR
) $(1)/usr
/sbin
85 $(PKG_INSTALL_DIR
)/usr
/sbin
/dnet \
89 $(eval
$(call BuildPackage
,libdnet
))