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 PKG_BUILD_DIR
:=$(BUILD_DIR
)/libdnet-
$(PKG_VERSION
)
20 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/libdnet
27 TITLE
:=Low-level network library
28 URL
:=http
://sourceforge.net
/projects
/libdnet
/
31 define Package
/libdnet
/description
32 libdnet is a library of simplified
, portable interface to several
33 low-level networking routines.
38 DEPENDS
:=libdnet
+python
40 TITLE
:=Low-level network library
41 URL
:=http
://sourceforge.net
/projects
/libdnet
/
44 define Package
/pydnet
/description
45 libdnet is a library of simplified
, portable interface to several
46 low-level networking routines.
59 DESTDIR
="$(PKG_INSTALL_DIR)" \
62 define Build
/InstallDev
64 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnet-config
$(1)/usr
/bin
/
65 mkdir
-p
$(1)/usr
/include
66 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/dnet.h
$(1)/usr
/include/
67 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/dnet
$(1)/usr
/include/
69 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libdnet.
{a
,so
*} $(1)/usr
/lib
/
72 define Package
/libdnet
/install
73 $(INSTALL_DIR
) $(1)/usr
/lib
74 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libdnet.so.
* $(1)/usr
/lib
/
75 $(INSTALL_DIR
) $(1)/usr
/sbin
76 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/sbin
/dnet
$(1)/usr
/sbin
/
79 define Package
/pydnet
/install
80 $(INSTALL_DIR
) $(1)/usr
/lib
81 cd
$(PKG_BUILD_DIR
)/python
; \
82 CFLAGS
="$(TARGET_CFLAGS)" \
83 $(STAGING_DIR
)/usr
/bin
/hostpython .
/setup.py
install \
84 --no-compile
--prefix $(PKG_INSTALL_DIR
)/usr
85 cp
-a
$(PKG_INSTALL_DIR
)/usr
/lib
/python
* $(1)/usr
/lib
/
89 $(eval
$(call BuildPackage
,libdnet
))
90 $(eval
$(call BuildPackage
,pydnet
))