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