2 # Copyright (C) 2006-2008 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
19 include $(INCLUDE_DIR)/package.mk
21 define Package/libdnet/Default
24 TITLE:=Low-level network library
25 URL:=http://sourceforge.net/projects/libdnet/
28 define Package/libdnet/Default/description
29 libdnet is a library of simplified, portable interface to several
30 low-level networking routines.
33 define Package/libdnet
34 $(call Package/libdnet/Default)
37 define Package/libdnet/description
38 $(call Package/libdnet/Default/description)
42 $(call Package/libdnet/Default)
43 DEPENDS:=libdnet +python-mini
46 define Package/pydnet/description
47 $(call Package/libdnet/Default/description)
48 This package contains the python dnet library.
51 TARGET_CFLAGS += $(FPIC)
63 DESTDIR="$(PKG_INSTALL_DIR)" \
66 define Build/InstallDev
67 $(INSTALL_DIR) $(2)/bin
69 $(PKG_INSTALL_DIR)/usr/bin/dnet-config \
72 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
75 $(INSTALL_DIR) $(1)/usr/include
77 $(PKG_INSTALL_DIR)/usr/include/dnet.h \
80 $(PKG_INSTALL_DIR)/usr/include/dnet \
83 $(INSTALL_DIR) $(1)/usr/lib
85 $(PKG_INSTALL_DIR)/usr/lib/libdnet.{la,a,so*} \
89 define Package/libdnet/install
90 $(INSTALL_DIR) $(1)/usr/lib
92 $(PKG_INSTALL_DIR)/usr/lib/libdnet.so.* \
95 $(INSTALL_DIR) $(1)/usr/sbin
97 $(PKG_INSTALL_DIR)/usr/sbin/dnet \
101 define Package/pydnet/install
102 $(INSTALL_DIR) $(1)/usr/lib
103 cd $(PKG_BUILD_DIR)/python; \
104 CFLAGS="$(TARGET_CFLAGS)" \
105 $(STAGING_DIR)/usr/bin/hostpython ./setup.py install \
106 --no-compile --prefix $(PKG_INSTALL_DIR)/usr
107 cp -a $(PKG_INSTALL_DIR)/usr/lib/python* $(1)/usr/lib/
111 $(eval $(call BuildPackage,libdnet))
112 $(eval $(call BuildPackage,pydnet))