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.
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
20 include $(INCLUDE_DIR)/package.mk
22 define Package/libdnet
25 TITLE:=Low-level network library
26 URL:=http://sourceforge.net/projects/libdnet/
29 define Package/libdnet/description
30 libdnet is a library of simplified, portable interface to several
31 low-level networking routines.
36 DEPENDS:=libdnet python-core
38 TITLE:=Low-level network library
39 URL:=http://sourceforge.net/projects/libdnet/
42 define Package/pydnet/description
43 libdnet is a library of simplified, portable interface to several
44 low-level networking routines.
47 TARGET_CFLAGS += $(FPIC)
59 DESTDIR="$(PKG_INSTALL_DIR)" \
62 define Build/InstallDev
63 $(INSTALL_DIR) $(2)/bin
65 $(PKG_INSTALL_DIR)/usr/bin/dnet-config \
68 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
71 $(INSTALL_DIR) $(1)/usr/include
73 $(PKG_INSTALL_DIR)/usr/include/dnet.h \
76 $(PKG_INSTALL_DIR)/usr/include/dnet \
79 $(INSTALL_DIR) $(1)/usr/lib
81 $(PKG_INSTALL_DIR)/usr/lib/libdnet.{la,a,so*} \
85 define Package/libdnet/install
86 $(INSTALL_DIR) $(1)/usr/lib
88 $(PKG_INSTALL_DIR)/usr/lib/libdnet.so.* \
91 $(INSTALL_DIR) $(1)/usr/sbin
93 $(PKG_INSTALL_DIR)/usr/sbin/dnet \
97 define Package/pydnet/install
98 $(INSTALL_DIR) $(1)/usr/lib
99 cd $(PKG_BUILD_DIR)/python; \
100 CFLAGS="$(TARGET_CFLAGS)" \
101 $(STAGING_DIR)/usr/bin/hostpython ./setup.py install \
102 --no-compile --prefix $(PKG_INSTALL_DIR)/usr
103 cp -a $(PKG_INSTALL_DIR)/usr/lib/python* $(1)/usr/lib/
107 $(eval $(call BuildPackage,libdnet))
108 $(eval $(call BuildPackage,pydnet))