fix up downloading in python packages
[openwrt/svn-archive/archive.git] / lang / pypcap / Makefile
1 #
2 # Copyright (C) 2007 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:=pypcap
12 PKG_VERSION:=1.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://pypcap.googlecode.com/files
17 PKG_MD5SUM:=034c3cbbfa81aa19e8f685b767c65764
18 PKG_BUILD_DEPENDS:=python
19
20 include $(INCLUDE_DIR)/package.mk
21 -include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
22 ifneq ($(MAKECMDGOALS),download)
23 $(if $(DUMP)$(Build/Compile/PyMod),,$(error Python packaging code not found.))
24 endif
25
26 define Package/python-pcap
27 SECTION:=lang
28 CATEGORY:=Languages
29 TITLE:=Python interface to lipcap
30 URL:=http://code.google.com/p/pypcap/
31 DEPENDS:=python-core +libpcap
32 endef
33
34 define PyPackage/python-pcap/filespec
35 +|$(PYTHON_PKG_DIR)/pcap.so
36 endef
37
38 define Build/Compile
39 $(call Build/Compile/PyMod,., \
40 install --prefix="$(PKG_INSTALL_DIR)/usr", \
41 PCAP_HOME="$(STAGING_DIR)/usr" \
42 )
43 endef
44
45 $(eval $(call PyPackage,python-pcap))
46 $(eval $(call BuildPackage,python-pcap))