clean up python packaging code.
[openwrt/svn-archive/archive.git] / lang / yapsnmp / Makefile
index 90f9c9fed571da4bcae9b3d3083deaa70ee4a91d..851fe9f14ddbc59a34b951e392076bda2a5a33a1 100644 (file)
@@ -15,24 +15,30 @@ PKG_RELEASE:=1
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
 PKG_MD5SUM:=8a3e9a5b814388d7907c639105cb2365
+PKG_BUILD_DEPENDS:=python
 
 include $(INCLUDE_DIR)/package.mk
-include ../python/python-package.mk
+-include $(if $(DUMP),,$(STAGING_DIR)/mk/python-package.mk)
+ifeq ($(DUMP)$(Build/Compile/PyMod),)
+  $(error Python packaging code not found.)
+endif
 
-define PyPackage/yapsnmp
- TITLE:=Python interface to Net-SNMP
- URL:=http://yapsnmp.sourceforge.net/
- DEPENDS+= +libnetsnmp
+define Package/python-yapsnmp
+  SECTION:=lang
+  CATEGORY:=Languages
+  TITLE:=Python interface to Net-SNMP
+  URL:=http://yapsnmp.sourceforge.net/
+  DEPENDS:=python-core +libnetsnmp
 endef
 
-define PyPackage/yapsnmp/description
+define Package/python-yapsnmp/description
  This package contains a Python SNMP module based on the net-snmp (formerly 
  known as ucd-snmp) library. It's composed of a low level interface to the 
  library, created using SWIG, and a higher level python module removing all 
  the complexity out of dealing with SNMP.
 endef
 
-define PyPackage/yapsnmp/filespec
+define PyPackage/python-yapsnmp/filespec
 +|$(PYTHON_PKG_DIR)/netsnmp.py
 +|$(PYTHON_PKG_DIR)/netsnmpc.so
 +|$(PYTHON_PKG_DIR)/yapsnmp.py
@@ -45,6 +51,7 @@ CONFIGURE_ARGS += \
 
 CONFIGURE_VARS += \
        ac_cv_file__usr_include_net_snmp_library="yes" \
+       ac_cv_prog_SWIG="echo MISSING SWIG" \
 
 define Build/Configure
        $(call Build/Configure/Default)
@@ -60,4 +67,5 @@ define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
 endef
 
-$(eval $(call PyPackage,yapsnmp))
+$(eval $(call PyPackage,python-yapsnmp))
+$(eval $(call BuildPackage,python-yapsnmp))