2006-07-22 15:57:28 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=libdnet
|
|
|
|
PKG_VERSION:=1.10
|
|
|
|
PKG_RELEASE:=1
|
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
|
|
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
|
|
|
|
PKG_MD5SUM:=416b765e9d9961501ac85e9a366fd219
|
|
|
|
PKG_CAT:=zcat
|
|
|
|
|
2006-10-28 22:43:08 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/libdnet-$(PKG_VERSION)
|
2006-07-22 15:57:28 +00:00
|
|
|
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/libdnet
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=Low-level network library
|
2006-10-28 22:43:08 +00:00
|
|
|
DESCRIPTION:=\
|
|
|
|
libdnet is a library of simplified, portable interface to several \\\
|
|
|
|
low-level networking routines.
|
2006-07-22 15:57:28 +00:00
|
|
|
URL:=http://sourceforge.net/projects/libdnet/
|
|
|
|
endef
|
|
|
|
|
2007-06-07 17:46:53 +00:00
|
|
|
define Package/pydnet
|
|
|
|
SECTION:=libs
|
|
|
|
DEPENDS:=libdnet +python
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=Low-level network library
|
|
|
|
DESCRIPTION:=\
|
|
|
|
libdnet is a library of simplified, portable interface to several \\\
|
|
|
|
low-level networking routines.
|
|
|
|
URL:=http://sourceforge.net/projects/libdnet/
|
|
|
|
endef
|
|
|
|
|
2007-07-31 10:42:05 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-static \
|
|
|
|
--without-check \
|
|
|
|
--without-python
|
|
|
|
|
|
|
|
CONFIGURE_VARS += \
|
|
|
|
ac_cv_dnet_bsd_bpf=no
|
2006-07-22 15:57:28 +00:00
|
|
|
|
2007-07-31 10:42:05 +00:00
|
|
|
MAKE_FLAGS += \
|
|
|
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
|
|
|
all install
|
2006-07-22 15:57:28 +00:00
|
|
|
|
|
|
|
define Build/InstallDev
|
2007-10-07 03:20:26 +00:00
|
|
|
mkdir -p $(1)/usr/bin
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/dnet-config $(1)/usr/bin/
|
|
|
|
mkdir -p $(1)/usr/include
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/dnet.h $(1)/usr/include/
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/dnet $(1)/usr/include/
|
|
|
|
mkdir -p $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdnet.{a,so*} $(1)/usr/lib/
|
2006-07-22 15:57:28 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/UninstallDev
|
|
|
|
rm -rf \
|
|
|
|
$(STAGING_DIR)/usr/bin/dnet-config \
|
|
|
|
$(STAGING_DIR)/usr/include/dnet.h \
|
|
|
|
$(STAGING_DIR)/usr/include/dnet \
|
|
|
|
$(STAGING_DIR)/usr/lib/libdnet.{a,so*}
|
|
|
|
endef
|
|
|
|
|
2006-10-28 22:43:08 +00:00
|
|
|
define Package/libdnet/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2006-10-28 22:43:08 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdnet.so.* $(1)/usr/lib/
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2006-10-28 22:43:08 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnet $(1)/usr/sbin/
|
|
|
|
endef
|
|
|
|
|
2007-06-07 17:46:53 +00:00
|
|
|
define Package/pydnet/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
cd $(PKG_BUILD_DIR)/python; \
|
2007-07-31 10:42:05 +00:00
|
|
|
CFLAGS="$(TARGET_CFLAGS)" \
|
2007-06-07 17:46:53 +00:00
|
|
|
$(STAGING_DIR)/usr/bin/hostpython ./setup.py install \
|
|
|
|
--no-compile --prefix $(PKG_INSTALL_DIR)/usr
|
|
|
|
cp -a $(PKG_INSTALL_DIR)/usr/lib/python* $(1)/usr/lib/
|
|
|
|
endef
|
|
|
|
|
|
|
|
|
2006-07-22 15:57:28 +00:00
|
|
|
$(eval $(call BuildPackage,libdnet))
|
2007-06-07 17:46:53 +00:00
|
|
|
$(eval $(call BuildPackage,pydnet))
|