2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
17 PKG_MD5SUM:=416b765e9d9961501ac85e9a366fd219
19 include $(INCLUDE_DIR)/package.mk
21 define Package/libdnet
24 TITLE:=Low-level network library
25 URL:=http://sourceforge.net/projects/libdnet/
28 define Package/libdnet/description
29 libdnet is a library of simplified, portable interface to several
30 low-level networking routines.
35 DEPENDS:=libdnet +python
37 TITLE:=Low-level network library
38 URL:=http://sourceforge.net/projects/libdnet/
41 define Package/pydnet/description
42 libdnet is a library of simplified, portable interface to several
43 low-level networking routines.
46 TARGET_CFLAGS += $(FPIC)
58 DESTDIR="$(PKG_INSTALL_DIR)" \
61 define Build/InstallDev
63 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dnet-config $(1)/usr/bin/
64 mkdir -p $(1)/usr/include
65 $(CP) $(PKG_INSTALL_DIR)/usr/include/dnet.h $(1)/usr/include/
66 $(CP) $(PKG_INSTALL_DIR)/usr/include/dnet $(1)/usr/include/
68 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdnet.{a,so*} $(1)/usr/lib/
71 define Package/libdnet/install
72 $(INSTALL_DIR) $(1)/usr/lib
73 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdnet.so.* $(1)/usr/lib/
74 $(INSTALL_DIR) $(1)/usr/sbin
75 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/dnet $(1)/usr/sbin/
78 define Package/pydnet/install
79 $(INSTALL_DIR) $(1)/usr/lib
80 cd $(PKG_BUILD_DIR)/python; \
81 CFLAGS="$(TARGET_CFLAGS)" \
82 $(STAGING_DIR)/usr/bin/hostpython ./setup.py install \
83 --no-compile --prefix $(PKG_INSTALL_DIR)/usr
84 cp -a $(PKG_INSTALL_DIR)/usr/lib/python* $(1)/usr/lib/
88 $(eval $(call BuildPackage,libdnet))
89 $(eval $(call BuildPackage,pydnet))