DESCRIPTION:= is obselete
[openwrt/svn-archive/archive.git] / libs / libdnet / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=libdnet
12 PKG_VERSION:=1.10
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
17 PKG_MD5SUM:=416b765e9d9961501ac85e9a366fd219
18 PKG_CAT:=zcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/libdnet-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libdnet
26 SECTION:=libs
27 CATEGORY:=Libraries
28 TITLE:=Low-level network library
29 URL:=http://sourceforge.net/projects/libdnet/
30 endef
31
32 define Package/libdnet/description
33 libdnet is a library of simplified, portable interface to several
34 low-level networking routines.
35 endef
36
37 define Package/pydnet
38 SECTION:=libs
39 DEPENDS:=libdnet +python
40 CATEGORY:=Libraries
41 TITLE:=Low-level network library
42 URL:=http://sourceforge.net/projects/libdnet/
43 endef
44
45 define Package/pydnet/description
46 libdnet is a library of simplified, portable interface to several
47 low-level networking routines.
48 endef
49
50 CONFIGURE_ARGS += \
51 --enable-shared \
52 --enable-static \
53 --without-check \
54 --without-python
55
56 CONFIGURE_VARS += \
57 ac_cv_dnet_bsd_bpf=no
58
59 MAKE_FLAGS += \
60 DESTDIR="$(PKG_INSTALL_DIR)" \
61 all install
62
63 define Build/InstallDev
64 mkdir -p $(1)/usr/bin
65 $(CP) $(PKG_INSTALL_DIR)/usr/bin/dnet-config $(1)/usr/bin/
66 mkdir -p $(1)/usr/include
67 $(CP) $(PKG_INSTALL_DIR)/usr/include/dnet.h $(1)/usr/include/
68 $(CP) $(PKG_INSTALL_DIR)/usr/include/dnet $(1)/usr/include/
69 mkdir -p $(1)/usr/lib
70 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdnet.{a,so*} $(1)/usr/lib/
71 endef
72
73 define Build/UninstallDev
74 rm -rf \
75 $(STAGING_DIR)/usr/bin/dnet-config \
76 $(STAGING_DIR)/usr/include/dnet.h \
77 $(STAGING_DIR)/usr/include/dnet \
78 $(STAGING_DIR)/usr/lib/libdnet.{a,so*}
79 endef
80
81 define Package/libdnet/install
82 $(INSTALL_DIR) $(1)/usr/lib
83 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdnet.so.* $(1)/usr/lib/
84 $(INSTALL_DIR) $(1)/usr/sbin
85 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnet $(1)/usr/sbin/
86 endef
87
88 define Package/pydnet/install
89 $(INSTALL_DIR) $(1)/usr/lib
90 cd $(PKG_BUILD_DIR)/python; \
91 CFLAGS="$(TARGET_CFLAGS)" \
92 $(STAGING_DIR)/usr/bin/hostpython ./setup.py install \
93 --no-compile --prefix $(PKG_INSTALL_DIR)/usr
94 cp -a $(PKG_INSTALL_DIR)/usr/lib/python* $(1)/usr/lib/
95 endef
96
97
98 $(eval $(call BuildPackage,libdnet))
99 $(eval $(call BuildPackage,pydnet))