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
20 PKG_BUILD_DIR
:=$(BUILD_DIR
)/libdnet-
$(PKG_VERSION
)
21 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/libdnet
28 TITLE
:=Low-level network library
30 libdnet is a library of simplified
, portable interface to several
\\\
31 low-level networking routines.
32 URL
:=http
://sourceforge.net
/projects
/libdnet
/
37 DEPENDS
:=libdnet
+python
39 TITLE
:=Low-level network library
41 libdnet is a library of simplified
, portable interface to several
\\\
42 low-level networking routines.
43 URL
:=http
://sourceforge.net
/projects
/libdnet
/
56 DESTDIR
="$(PKG_INSTALL_DIR)" \
59 define Build
/InstallDev
61 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/dnet-config
$(1)/usr
/bin
/
62 mkdir
-p
$(1)/usr
/include
63 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/dnet.h
$(1)/usr
/include/
64 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/dnet
$(1)/usr
/include/
66 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libdnet.
{a
,so
*} $(1)/usr
/lib
/
69 define Build
/UninstallDev
71 $(STAGING_DIR
)/usr
/bin
/dnet-config \
72 $(STAGING_DIR
)/usr
/include/dnet.h \
73 $(STAGING_DIR
)/usr
/include/dnet \
74 $(STAGING_DIR
)/usr
/lib
/libdnet.
{a
,so
*}
77 define Package
/libdnet
/install
78 $(INSTALL_DIR
) $(1)/usr
/lib
79 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libdnet.so.
* $(1)/usr
/lib
/
80 $(INSTALL_DIR
) $(1)/usr
/sbin
81 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/dnet
$(1)/usr
/sbin
/
84 define Package
/pydnet
/install
85 $(INSTALL_DIR
) $(1)/usr
/lib
86 cd
$(PKG_BUILD_DIR
)/python
; \
87 CFLAGS
="$(TARGET_CFLAGS)" \
88 $(STAGING_DIR
)/usr
/bin
/hostpython .
/setup.py
install \
89 --no-compile
--prefix $(PKG_INSTALL_DIR
)/usr
90 cp
-a
$(PKG_INSTALL_DIR
)/usr
/lib
/python
* $(1)/usr
/lib
/
94 $(eval
$(call BuildPackage
,libdnet
))
95 $(eval
$(call BuildPackage
,pydnet
))