8ba8149146394f87d0e957cc4fa712118a692e7f
[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 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-yapsnmp
27 SECTION:=lang
28 CATEGORY:=Languages
29 TITLE:=Python interface to Net-SNMP
30 URL:=http://yapsnmp.sourceforge.net/
31 DEPENDS:=python-core +libnetsnmp
32 endef
33
34 define Package/python-yapsnmp/description
35 This package contains a Python SNMP module based on the net-snmp (formerly
36 known as ucd-snmp) library. It's composed of a low level interface to the
37 library, created using SWIG, and a higher level python module removing all
38 the complexity out of dealing with SNMP.
39 endef
40
41 define PyPackage/python-yapsnmp/filespec
42 +|$(PYTHON_PKG_DIR)/netsnmp.py
43 +|$(PYTHON_PKG_DIR)/netsnmpc.so
44 +|$(PYTHON_PKG_DIR)/yapsnmp.py
45 endef
46
47 CONFIGURE_ARGS += \
48 --enable-shared \
49 --enable-static \
50 --enable-site-packages-prefix="$(PYTHON_PKG_DIR)" \
51
52 CONFIGURE_VARS += \
53 ac_cv_file__usr_include_net_snmp_library="yes" \
54 ac_cv_prog_SWIG="echo MISSING SWIG" \
55
56 define Build/Configure
57 $(call Build/Configure/Default)
58 $(call libtool_disable_rpath)
59 endef
60
61 define Build/Compile
62 $(MAKE) -C $(PKG_BUILD_DIR) \
63 INCLUDES="-I$(PYTHON_INC_DIR)" \
64 SNMPINCDIR="$(STAGING_DIR)/usr/include/net-snmp/library" \
65 all
66 $(call libtool_fixup_libdir,$(PKG_INSTALL_DIR))
67 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
68 endef
69
70 $(eval $(call PyPackage,python-yapsnmp))
71 $(eval $(call BuildPackage,python-yapsnmp))