2 # Copyright (C) 2006-2010 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:=@SF/$(PKG_NAME)
16 PKG_MD5SUM:=04c394ed8e1e7fc455456e79e908916d
21 include $(INCLUDE_DIR)/package.mk
23 define Package/libdnet/Default
26 TITLE:=Low-level network library
27 URL:=http://sourceforge.net/projects/libdnet/
30 define Package/libdnet/Default/description
31 libdnet is a library of simplified, portable interface to several
32 low-level networking routines.
35 define Package/libdnet
36 $(call Package/libdnet/Default)
39 define Package/libdnet/description
40 $(call Package/libdnet/Default/description)
44 $(call Package/libdnet/Default)
45 DEPENDS:=libdnet +python-mini
48 define Package/pydnet/description
49 $(call Package/libdnet/Default/description)
50 This package contains the python dnet library.
53 TARGET_CFLAGS += $(FPIC)
64 define Build/InstallDev
65 $(INSTALL_DIR) $(2)/bin
67 $(PKG_INSTALL_DIR)/usr/bin/dnet-config \
70 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
73 $(INSTALL_DIR) $(1)/usr/include
75 $(PKG_INSTALL_DIR)/usr/include/dnet.h \
78 $(PKG_INSTALL_DIR)/usr/include/dnet \
81 $(INSTALL_DIR) $(1)/usr/lib
83 $(PKG_INSTALL_DIR)/usr/lib/libdnet.{la,a,so*} \
87 define Package/libdnet/install
88 $(INSTALL_DIR) $(1)/usr/lib
90 $(PKG_INSTALL_DIR)/usr/lib/libdnet.so.* \
93 $(INSTALL_DIR) $(1)/usr/sbin
95 $(PKG_INSTALL_DIR)/usr/sbin/dnet \
99 define Package/pydnet/install
100 $(INSTALL_DIR) $(1)/usr/lib
101 cd $(PKG_BUILD_DIR)/python; \
102 CFLAGS="$(TARGET_CFLAGS)" \
103 $(STAGING_DIR)/usr/bin/hostpython ./setup.py install \
104 --no-compile --prefix $(PKG_INSTALL_DIR)/usr
105 cp -a $(PKG_INSTALL_DIR)/usr/lib/python* $(1)/usr/lib/
109 $(eval $(call BuildPackage,libdnet))
110 $(eval $(call BuildPackage,pydnet))