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
22 CONFIG_PACKAGE_libdnet \
25 PKG_BUILD_DEPENDS:=PACKAGE_pydnet:python
27 include $(INCLUDE_DIR)/package.mk
28 $(call include_mk, python-package.mk)
30 define Package/libdnet/Default
33 TITLE:=Low-level network library
34 URL:=http://sourceforge.net/projects/libdnet/
37 define Package/libdnet/Default/description
38 libdnet is a library of simplified, portable interface to several
39 low-level networking routines.
42 define Package/libdnet
43 $(call Package/libdnet/Default)
46 define Package/libdnet/description
47 $(call Package/libdnet/Default/description)
51 $(call Package/libdnet/Default)
52 DEPENDS:=libdnet +python-mini
55 define Package/pydnet/description
56 $(call Package/libdnet/Default/description)
57 This package contains the python dnet library.
60 TARGET_CFLAGS += $(FPIC)
72 CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
74 define Build/Configure
75 (cd $(PKG_BUILD_DIR); \
76 ln -sf config/acinclude.m4 . ; \
77 autoreconf -v --install || exit 1 \
79 $(call Build/Configure/Default)
83 $(call Build/Compile/Default)
84 $(if $(CONFIG_PACKAGE_pydnet), \
85 $(call Build/Compile/PyMod, \
93 $(call Build/Install/Default)
94 $(if $(CONFIG_PACKAGE_pydnet), \
95 $(call Build/Compile/PyMod, \
97 install --no-compile --prefix $(PKG_INSTALL_DIR)/usr \
102 define Build/InstallDev
103 $(INSTALL_DIR) $(2)/bin
105 $(PKG_INSTALL_DIR)/usr/bin/dnet-config \
108 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' \
111 $(INSTALL_DIR) $(1)/usr/include
113 $(PKG_INSTALL_DIR)/usr/include/dnet.h \
116 $(PKG_INSTALL_DIR)/usr/include/dnet \
119 $(INSTALL_DIR) $(1)/usr/lib
121 $(PKG_INSTALL_DIR)/usr/lib/libdnet.{la,a,so*} \
125 define Package/libdnet/install
126 $(INSTALL_DIR) $(1)/usr/lib
128 $(PKG_INSTALL_DIR)/usr/lib/libdnet.so.* \
131 $(INSTALL_DIR) $(1)/usr/sbin
133 $(PKG_INSTALL_DIR)/usr/sbin/dnet \
137 define Package/pydnet/install
138 $(INSTALL_DIR) $(1)/usr/lib
139 $(CP) $(PKG_INSTALL_DIR)/usr/lib/python* $(1)/usr/lib/
143 $(eval $(call BuildPackage,libdnet))
144 $(eval $(call BuildPackage,pydnet))