wshaper: stupid me, forget to create dirs
[openwrt/svn-archive/archive.git] / lang / yapsnmp / 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:=yapsnmp
12 PKG_VERSION:=0.7.8
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
17 PKG_MD5SUM:=8a3e9a5b814388d7907c639105cb2365
18 PKG_BUILD_DEPENDS:=python
19
20 PKG_FIXUP = libtool
21
22 include $(INCLUDE_DIR)/package.mk
23 -include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
24 ifneq ($(MAKECMDGOALS),download)
25 $(if $(DUMP)$(Build/Compile/PyMod),,$(error Python packaging code not found.))
26 endif
27
28 define Package/python-yapsnmp
29 SECTION:=lang
30 CATEGORY:=Languages
31 TITLE:=Python interface to Net-SNMP
32 URL:=http://yapsnmp.sourceforge.net/
33 DEPENDS:=python-core +libnetsnmp
34 endef
35
36 define Package/python-yapsnmp/description
37 This package contains a Python SNMP module based on the net-snmp (formerly
38 known as ucd-snmp) library. It's composed of a low level interface to the
39 library, created using SWIG, and a higher level python module removing all
40 the complexity out of dealing with SNMP.
41 endef
42
43 define PyPackage/python-yapsnmp/filespec
44 +|$(PYTHON_PKG_DIR)/netsnmp.py
45 +|$(PYTHON_PKG_DIR)/netsnmpc.so
46 +|$(PYTHON_PKG_DIR)/yapsnmp.py
47 endef
48
49 CONFIGURE_ARGS += \
50 --enable-shared \
51 --enable-static \
52 --enable-site-packages-prefix="$(PYTHON_PKG_DIR)" \
53
54 CONFIGURE_VARS += \
55 ac_cv_file__usr_include_net_snmp_library="yes" \
56 ac_cv_prog_SWIG="echo MISSING SWIG" \
57
58 define Build/Compile
59 $(MAKE) -C $(PKG_BUILD_DIR) \
60 INCLUDES="-I$(PYTHON_INC_DIR)" \
61 SNMPINCDIR="$(STAGING_DIR)/usr/include/net-snmp/library" \
62 all
63 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
64 endef
65
66 $(eval $(call PyPackage,python-yapsnmp))
67 $(eval $(call BuildPackage,python-yapsnmp))