--- /dev/null
+#
+# Copyright (C) 2007 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=egenix-mx
+PKG_VERSION:=2.0.6
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-base-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.egenix.com/files/python/
+PKG_MD5SUM:=66841151728a06f92d0b8dd2ed317a29
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-base-$(PKG_VERSION)
+
+include $(INCLUDE_DIR)/package.mk
+include ../python/python-package.mk
+
+define PyPackage/egenix-mx
+ TITLE:=Egenix mxBase
+ URL:=http://www.egenix.com/products/python/mxBase/
+endef
+
+define PyPackage/egenix-mx/description
+ This package contains a set of base packages from Egenix required by other
+ python packages.
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,., \
+ build --build-lib="foo", \
+ BASECFLAGS="$(TARGET_CFLAGS)" \
+ OPT="" \
+ )
+endef
+
+define Build/InstallDev
+ mkdir -p $(STAGING_DIR)$(PYTHON_PKG_DIR)/mx/BeeBase/mxBeeBase
+ $(CP) \
+ $(PKG_BUILD_DIR)/mx/BeeBase/mxBeeBase/mxh.h \
+ $(PKG_BUILD_DIR)/mx/BeeBase/mxBeeBase/btr.h \
+ $(PKG_BUILD_DIR)/mx/BeeBase/mxBeeBase/mxBeeBase.h \
+ $(STAGING_DIR)$(PYTHON_PKG_DIR)/mx/BeeBase/mxBeeBase/
+ mkdir -p $(STAGING_DIR)$(PYTHON_PKG_DIR)/mx/DateTime/mxDateTime
+ $(CP) \
+ $(PKG_BUILD_DIR)/mx/DateTime/mxDateTime/mxh.h \
+ $(PKG_BUILD_DIR)/mx/DateTime/mxDateTime/mxDateTime.h \
+ $(STAGING_DIR)$(PYTHON_PKG_DIR)/mx/DateTime/mxDateTime/
+ mkdir -p $(STAGING_DIR)$(PYTHON_PKG_DIR)/mx/Proxy/mxProxy
+ $(CP) \
+ $(PKG_BUILD_DIR)/mx/Proxy/mxProxy/mxh.h \
+ $(PKG_BUILD_DIR)/mx/Proxy/mxProxy/mxProxy.h \
+ $(STAGING_DIR)$(PYTHON_PKG_DIR)/mx/Proxy/mxProxy/
+ mkdir -p $(STAGING_DIR)$(PYTHON_PKG_DIR)/mx/Queue/mxQueue
+ $(CP) \
+ $(PKG_BUILD_DIR)/mx/Queue/mxQueue/mxh.h \
+ $(PKG_BUILD_DIR)/mx/Queue/mxQueue/mxQueue.h \
+ $(STAGING_DIR)$(PYTHON_PKG_DIR)/mx/Queue/mxQueue/
+ mkdir -p $(STAGING_DIR)$(PYTHON_PKG_DIR)/mx/TextTools/mxTextTools
+ $(CP) \
+ $(PKG_BUILD_DIR)/mx/TextTools/mxTextTools/mxh.h \
+ $(PKG_BUILD_DIR)/mx/TextTools/mxTextTools/mxbmse.h \
+ $(PKG_BUILD_DIR)/mx/TextTools/mxTextTools/mxte.h \
+ $(PKG_BUILD_DIR)/mx/TextTools/mxTextTools/mxTextTools.h \
+ $(STAGING_DIR)$(PYTHON_PKG_DIR)/mx/TextTools/mxTextTools/
+ mkdir -p $(STAGING_DIR)$(PYTHON_PKG_DIR)/mx/Tools/mxTools
+ $(CP) \
+ $(PKG_BUILD_DIR)/mx/Tools/mxTools/mxh.h \
+ $(PKG_BUILD_DIR)/mx/Tools/mxTools/mxTools.h \
+ $(STAGING_DIR)$(PYTHON_PKG_DIR)/mx/Tools/mxTools/
+endef
+
+define Build/UninstallDev
+ rm -rf $(STAGING_DIR)$(PYTHON_PKG_DIR)/mx
+endef
+
+define PyPackage/egenix-mx/install
+ $(CP) $(PKG_BUILD_DIR)/foo/mx $(1)$(PYTHON_PKG_DIR)/
+ ln -sf $(1)$(PYTHON_PKG_DIR)/mx/BeeBase/ExitFunctions.py \
+ $(1)$(PYTHON_PKG_DIR)/mx/Misc/
+ rm -rf $(1)$(PYTHON_PKG_DIR)/mx/*/Examples
+endef
+
+$(eval $(call PyPackage,egenix-mx))
+#
+# Copyright (C) 2007 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
include $(TOPDIR)/rules.mk
PKG_NAME:=kid
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.kid-templating.org/dist/0.9.6/dist
PKG_MD5SUM:=31e7156698a6f214b4067afb9e13728f
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
include $(INCLUDE_DIR)/package.mk
+include ../python/python-package.mk
-define Package/kid
- SECTION:=lang
- CATEGORY:=Languages
- TITLE:=Kid
- DEPENDS:=+python
- DESCRIPTION:=\
- Kid is a simple template language for XML based vocabularies written in Python.
+define PyPackage/kid
+ TITLE:=XML-based Templating
URL=http://www.kid-templating.org/
endef
-define Build/Compile
- $(call Build/Compile/PyMod,,install)
+define PyPackage/kid/description
+ Kid is a simple template language for XML based vocabularies written in
+ Python.
endef
-define Package/kid/install
- $(CP) -R $(PKG_INSTALL_DIR)/* $(1)
+define PyPackage/kid/filespec
++|$(PYTHON_PKG_DIR)/kid
+-|$(PYTHON_PKG_DIR)/kid/test
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,., \
+ install --prefix="$(PKG_INSTALL_DIR)/usr", \
+ )
endef
-$(eval $(call BuildPackage,kid))
+$(eval $(call PyPackage,kid))
--- /dev/null
+#
+# Copyright (C) 2007 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=psycopg
+PKG_VERSION:=1.1.21
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://www.initd.org/pub/software/psycopg/
+PKG_MD5SUM:=a31f79f68d6d32898d6f24e11369a106
+
+include $(INCLUDE_DIR)/package.mk
+include ../python/python-package.mk
+
+define PyPackage/psycopg
+ TITLE:=PostgreSQL database adapter
+ URL=http://www.initd.org/
+ DEPENDS+= +libpq +egenix-mx
+endef
+
+define PyPackage/psycopg/description
+ This package contains is a PostgreSQL database adapter for the Python
+ programming language.
+endef
+
+CONFIGURE_ARGS += \
+ --with-python="$(PYTHON)" \
+ --with-postgres-libraries="$(STAGING_DIR)/usr/lib" \
+ --with-postgres-includes="$(STAGING_DIR)/usr/include" \
+ --with-mxdatetime-includes="$(STAGING_DIR)$(PYTHON_PKG_DIR)/mx/DateTime/mxDateTime" \
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ OPT="$(TARGET_CFLAGS)"
+endef
+
+define PyPackage/psycopg/install
+ $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/psycopgmodule.so $(1)$(PYTHON_PKG_DIR)/
+endef
+
+$(eval $(call PyPackage,psycopg))
--- /dev/null
+#
+# Copyright (C) 2007 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pyevent
+PKG_VERSION:=0.3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://pyevent.googlecode.com/files/
+PKG_MD5SUM:=584912c92d08bf005283fb29a47a6e4d
+
+include $(INCLUDE_DIR)/package.mk
+include ../python/python-package.mk
+
+define PyPackage/pyevent
+ TITLE:=Python interface to libevent
+ URL=http://code.google.com/p/pyevent/
+ DEPENDS+= +libevent
+endef
+
+define PyPackage/pyevent/filespec
++|$(PYTHON_PKG_DIR)/event.so
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,., \
+ install --prefix="$(PKG_INSTALL_DIR)/usr", \
+ LIBEVENT_HOME="$(STAGING_DIR)/usr/lib" \
+ )
+endef
+
+$(eval $(call PyPackage,pyevent))
--- /dev/null
+diff -ruN pyevent-0.3.pris/setup.py pyevent-0.3/setup.py
+--- pyevent-0.3.pris/setup.py 2005-09-11 22:44:04.000000000 -0500
++++ pyevent-0.3/setup.py 2007-04-23 11:17:14.500323500 -0500
+@@ -5,9 +5,13 @@
+ from distutils.core import setup, Extension
+ import glob, os, sys
+
+-if glob.glob('/usr/lib/libevent.*'):
+- print 'found system libevent for', sys.platform
+- event = Extension(name='event',
++# Where to find libevent
++libevent_location = os.environ.get('LIBEVENT_HOME')
++
++if libevent_location != None:
++ if glob.glob('%s/libevent.*' % (libevent_location,)):
++ print 'found system libevent for', sys.platform
++ event = Extension(name='event',
+ sources=[ 'event.c' ],
+ libraries=[ 'event' ])
+ elif glob.glob('%s/lib/libevent.*' % sys.prefix):
--- /dev/null
+--- pyevent-0.3-old/event.pyx 2005-09-11 22:16:15.000000000 -0500
++++ pyevent-0.3/event.pyx 2007-06-12 11:28:33.000000000 -0500
+@@ -259,7 +259,7 @@
+ global __event_exc
+ event_dispatch()
+ if __event_exc:
+- raise __event_exc[0], __event_exc[1], __event_exc[2]
++ raise OSError, "%s [%s]" % (__event_exc[0], __event_exc[1]), __event_exc[2]
+
+ def loop(nonblock=False):
+ """Dispatch all pending events on queue in a single pass."""
--- /dev/null
+#
+# Copyright (C) 2007 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pypcap
+PKG_VERSION:=1.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://pypcap.googlecode.com/files
+PKG_MD5SUM:=034c3cbbfa81aa19e8f685b767c65764
+
+include $(INCLUDE_DIR)/package.mk
+include ../python/python-package.mk
+
+define PyPackage/pypcap
+ TITLE:=Python interface to lipcap
+ URL:=http://code.google.com/p/pypcap/
+ DEPENDS+= +libpcap
+endef
+
+define PyPackage/pypcap/filespec
++|$(PYTHON_PKG_DIR)/pcap.so
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,., \
+ install --prefix="$(PKG_INSTALL_DIR)/usr", \
+ PCAP_HOME="$(STAGING_DIR)/usr" \
+ )
+endef
+
+$(eval $(call PyPackage,pypcap))
--- /dev/null
+--- pypcap/setup.py 2006-03-15 13:59:54.000000000 -0600
++++ pypcap.new/setup.py 2007-05-25 17:29:02.413355500 -0500
+@@ -4,69 +4,53 @@
+
+ from distutils.core import setup, Extension
+ from distutils.command import config, clean
+-import cPickle, glob, os, sys
++import os,sys,glob
+
+-pcap_config = {}
+-pcap_cache = 'config.pkl'
++# where to find pcap
++pcap_location = os.environ.get('PCAP_HOME')
+
+-class config_pcap(config.config):
+- description = 'configure pcap paths'
+- user_options = [ ('with-pcap=', None,
+- 'path to pcap build or installation directory') ]
+-
+- def initialize_options(self):
+- config.config.initialize_options(self)
+- self.dump_source = 0
+- #self.noisy = 0
+- self.with_pcap = None
+-
+- def _write_config_h(self, cfg):
+- # XXX - write out config.h for pcap_ex.c
+- d = {}
+- if os.path.exists(os.path.join(cfg['include_dirs'][0], 'pcap-int.h')):
+- d['HAVE_PCAP_INT_H'] = 1
+- buf = open(os.path.join(cfg['include_dirs'][0], 'pcap.h')).read()
+- if buf.find('pcap_file(') != -1:
+- d['HAVE_PCAP_FILE'] = 1
+- if buf.find('pcap_compile_nopcap(') != -1:
+- d['HAVE_PCAP_COMPILE_NOPCAP'] = 1
+- if buf.find('pcap_setnonblock(') != -1:
+- d['HAVE_PCAP_SETNONBLOCK'] = 1
+- f = open('config.h', 'w')
+- for k, v in d.iteritems():
+- f.write('#define %s %s\n' % (k, v))
+-
+- def _pcap_config(self, dirs=[ None ]):
+- cfg = {}
+- if not dirs[0]:
+- dirs = [ '/usr', sys.prefix ] + glob.glob('/opt/libpcap*') + \
+- glob.glob('../libpcap*') + glob.glob('../wpdpack*')
+- for d in dirs:
+- for sd in ('include', 'include/pcap', ''):
+- incdirs = [ os.path.join(d, sd) ]
+- if os.path.exists(os.path.join(d, sd, 'pcap.h')):
+- cfg['include_dirs'] = [ os.path.join(d, sd) ]
+- for sd in ('lib', ''):
+- for lib in (('pcap', 'libpcap.a'),
+- ('pcap', 'libpcap.dylib'),
+- ('wpcap', 'wpcap.lib')):
+- if os.path.exists(os.path.join(d, sd, lib[1])):
+- cfg['library_dirs'] = [ os.path.join(d, sd) ]
+- cfg['libraries'] = [ lib[0] ]
+- if lib[0] == 'wpcap':
+- cfg['libraries'].append('iphlpapi')
+- cfg['extra_compile_args'] = \
+- [ '-DWIN32', '-DWPCAP' ]
+- print 'found', cfg
+- self._write_config_h(cfg)
+- return cfg
+- raise "couldn't find pcap build or installation directory"
+-
+- def run(self):
+- #config.log.set_verbosity(0)
+- cPickle.dump(self._pcap_config([ self.with_pcap ]),
+- open(pcap_cache, 'wb'))
+- self.temp_files.append(pcap_cache)
++def write_config_h(cfg):
++ # XXX - write out config.h for pcap_ex.c
++ d = {}
++ if os.path.exists(os.path.join(cfg['include_dirs'][0], 'pcap-int.h')):
++ d['HAVE_PCAP_INT_H'] = 1
++ buf = open(os.path.join(cfg['include_dirs'][0], 'pcap.h')).read()
++ if buf.find('pcap_file(') != -1:
++ d['HAVE_PCAP_FILE'] = 1
++ if buf.find('pcap_compile_nopcap(') != -1:
++ d['HAVE_PCAP_COMPILE_NOPCAP'] = 1
++ if buf.find('pcap_setnonblock(') != -1:
++ d['HAVE_PCAP_SETNONBLOCK'] = 1
++ f = open('config.h', 'w')
++ for k, v in d.iteritems():
++ f.write('#define %s %s\n' % (k, v))
++
++
++def f_pcap_config(dirs=[ None ]):
++ cfg = {}
++ if not dirs[0]:
++ dirs = [ '/usr', sys.prefix ] + glob.glob('/opt/libpcap*') + \
++ glob.glob('../libpcap*') + glob.glob('../wpdpack*')
++ for d in dirs:
++ for sd in ('include', 'include/pcap', ''):
++ incdirs = [ os.path.join(d, sd) ]
++ if os.path.exists(os.path.join(d, sd, 'pcap.h')):
++ cfg['include_dirs'] = [ os.path.join(d, sd) ]
++ for sd in ('lib', ''):
++ for lib in (('pcap', 'libpcap.a'),
++ ('pcap', 'libpcap.dylib'),
++ ('wpcap', 'wpcap.lib')):
++ if os.path.exists(os.path.join(d, sd, lib[1])):
++ cfg['library_dirs'] = [ os.path.join(d, sd) ]
++ cfg['libraries'] = [ lib[0] ]
++ if lib[0] == 'wpcap':
++ cfg['libraries'].append('iphlpapi')
++ cfg['extra_compile_args'] = \
++ [ '-DWIN32', '-DWPCAP' ]
++ print 'found', cfg
++ write_config_h(cfg)
++ return cfg
++ raise "couldn't find pcap build or installation directory"
+
+ class clean_pcap(clean.clean):
+ def run(self):
+@@ -75,13 +59,9 @@
+ print "removing '%s'" % pcap_cache
+ os.unlink(pcap_cache)
+
+-if len(sys.argv) > 1 and sys.argv[1] == 'build':
+- try:
+- pcap_config = cPickle.load(open(pcap_cache))
+- except IOError:
+- print >>sys.stderr, 'run "%s config" first!' % sys.argv[0]
+- sys.exit(1)
+
++
++pcap_config = f_pcap_config([pcap_location])
+ pcap = Extension(name='pcap',
+ sources=[ 'pcap.c', 'pcap_ex.c' ],
+ include_dirs=pcap_config.get('include_dirs', ''),
+@@ -89,7 +69,7 @@
+ libraries=pcap_config.get('libraries', ''),
+ extra_compile_args=pcap_config.get('extra_compile_args', ''))
+
+-pcap_cmds = { 'config':config_pcap, 'clean':clean_pcap }
++pcap_cmds = { 'clean':clean_pcap }
+
+ setup(name='pcap',
+ version='1.1',
--- /dev/null
+--- pypcap-1.1-old/pcap.pyx 2005-10-16 18:00:11.000000000 -0500
++++ pypcap-1.1/pcap.pyx 2007-06-12 11:11:41.000000000 -0500
+@@ -285,7 +285,7 @@
+ <unsigned char *>&ctx)
+ if ctx.got_exc:
+ exc = sys.exc_info()
+- raise exc[0], exc[1], exc[2]
++ raise OSError, "%s [%s]" % (exc[0], exc[1]), exc[2]
+ return n
+
+ def loop(self, callback, *args):
--- /dev/null
+#
+# Copyright (C) 2007 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=pysqlite
+PKG_VERSION:=2.3.5
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://initd.org/pub/software/pysqlite/releases/2.3/2.3.5/
+PKG_MD5SUM:=b4a185e936848370fcc1a5b17755b641
+
+include $(INCLUDE_DIR)/package.mk
+include ../python/python-package.mk
+
+define PyPackage/pysqlite
+ TITLE:=SQLite database adapter
+ URL=http://www.initd.org/tracker/pysqlite/wiki/pysqlite
+ DEPENDS+= +libsqlite3
+endef
+
+define PyPackage/pysqlite/description
+ This package contains an SQLite database adapter for the Python
+ programming language.
+endef
+
+define PyPackage/pysqlite/filespec
++|$(PYTHON_PKG_DIR)/pysqlite2
+-|$(PYTHON_PKG_DIR)/pysqlite2/test
+endef
+
+define Build/Compile
+ $(call Build/Compile/PyMod,., \
+ install --prefix="$(PKG_INSTALL_DIR)/usr", \
+ )
+endef
+
+$(eval $(call PyPackage,pysqlite))
define Package/python
SECTION:=lang
CATEGORY:=Languages
- DEPENDS:=+uclibcxx +libpthread +libreadline +libncurses +libopenssl +libexpat
+ DEPENDS:=+libexpat +libopenssl +libpthread +libreadline +uclibcxx
TITLE:=Python 2.5 programming language
URL:=http://www.python.org/
endef
endef
MAKE_OPTS:=\
- $(TARGET_CONFIGURE_OPTS) \
- PYTHON_MODULES_INCLUDE=$(STAGING_DIR)/include \
- PYTHON_MODULES_LIB=$(STAGING_DIR)/lib \
- PYTHON_DISABLE_MODULES="$(PY_DISABLED_MODULES)" \
- CFLAGS="$(TARGET_CFLAGS) -fno-inline" \
- LDFLAGS="$(TARGET_LDFLAGS) -lncurses" \
- LD="$(TARGET_CC)" \
- HOSTPYTHON=./hostpython \
- HOSTPGEN=./Parser/hostpgen
+ $(TARGET_CONFIGURE_OPTS) \
+ PYTHON_MODULES_INCLUDE=$(STAGING_DIR)/include \
+ PYTHON_MODULES_LIB=$(STAGING_DIR)/lib \
+ PYTHON_DISABLE_MODULES="$(PY_DISABLED_MODULES)" \
+ CFLAGS="$(TARGET_CFLAGS) -fno-inline" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ LD="$(TARGET_CC)" \
+ HOSTPYTHON=./hostpython \
+ HOSTPGEN=./Parser/hostpgen
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
$(CP) $(PKG_INSTALL_DIR)/usr/include/python2.5 $(STAGING_DIR)/usr/include/
mkdir -p $(STAGING_DIR)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.5 $(STAGING_DIR)/usr/lib/
- $(CP) $(PKG_BUILD_DIR)/libpython2.5.a $(STAGING_DIR)/usr/lib/python2.5
+ $(CP) $(PKG_BUILD_DIR)/libpython2.5.a $(STAGING_DIR)/usr/lib/python2.5/
endef
define Build/UninstallDev
- rm -rf \
- $(STAGING_DIR)/usr/{include,lib}/python2.5
+ rm -rf $(STAGING_DIR)/usr/bin/hostpython \
+ $(STAGING_DIR)/usr/include/python2.5 \
+ $(STAGING_DIR)/usr/lib/python2.5
endef
define Package/python/install
$(CP) $(PKG_INSTALL_DIR)/usr/include/python2.5/Python.h $(1)/usr/include/python2.5/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/python2.5 $(1)/usr/lib/
- rm -rf \
- $(1)/usr/lib/python2.5/bsddb/test \
+ rm -rf $(1)/usr/lib/python2.5/bsddb/test \
$(1)/usr/lib/python2.5/distutils/tests \
$(1)/usr/lib/python2.5/email/test \
$(1)/usr/lib/python2.5/idlelib \
--- /dev/null
+#
+# Copyright (C) 2007 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+ifeq ($(DUMP),)
+
+ PYTHON:=$(STAGING_DIR)/usr/bin/hostpython
+
+ PYTHON_VERSION=2.5
+
+ PYTHON_INC_DIR:=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION)
+ PYTHON_LIB_DIR:=$(STAGING_DIR)/usr/lib/python$(PYTHON_VERSION)
+
+ PYTHON_PKG_DIR:=/usr/lib/python$(PYTHON_VERSION)/site-packages
+
+endif
+
+define PyPackage
+ NAME:=$(1)
+ $(eval $(call PyPackage/$(1)))
+
+ define Package/$(1)
+ TITLE:=$(TITLE)
+ SECTION:=lang
+ CATEGORY:=Languages
+ DEPENDS:=+python
+ $(call PyPackage/$(1))
+ endef
+
+ ifdef PyPackage/$(1)/description
+ define Package/$(1)/description
+$(call PyPackage/$(1)/description)
+ endef
+ endif
+
+ $(call shexport,PyPackage/$(1)/filespec)
+
+ define Package/$(1)/install
+ @getvar $$(call shvar,PyPackage/$(1)/filespec) | ( \
+ IFS='|'; \
+ while read fop fspec fperm; do \
+ if [ "$$$$$$$$fop" = "+" ]; then \
+ dpath=`dirname "$$$$$$$$fspec"`; \
+ if [ -n "$$$$$$$$fperm" ]; then \
+ dperm="-m$$$$$$$$fperm"; \
+ else \
+ dperm=`stat -c "%a" $(PKG_INSTALL_DIR)$$$$$$$$dpath`; \
+ fi; \
+ mkdir -p $$$$$$$$$dperm $$(1)$$$$$$$$dpath; \
+ echo "copying: '$$$$$$$$fspec'"; \
+ cp -fpR $(PKG_INSTALL_DIR)$$$$$$$$fspec $$(1)$$$$$$$$dpath/; \
+ if [ -n "$$$$$$$$fperm" ]; then \
+ chmod -R $$$$$$$$fperm $$(1)$$$$$$$$fspec; \
+ fi; \
+ elif [ "$$$$$$$$fop" = "-" ]; then \
+ echo "removing: '$$$$$$$$fspec'"; \
+ rm -fR $$(1)$$$$$$$$fspec; \
+ elif [ "$$$$$$$$fop" = "=" ]; then \
+ echo "setting permissions: '$$$$$$$$fperm' on '$$$$$$$$fspec'"; \
+ chmod -R $$$$$$$$fperm $$(1)$$$$$$$$fspec; \
+ fi; \
+ done; \
+ )
+ $(call PyPackage/$(1)/install,$$(1))
+ endef
+
+ $$(eval $$(call BuildPackage,$(1)))
+endef
+
+define Build/Compile/PyMod
+ ( cd $(PKG_BUILD_DIR)/$(1); \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ CPPFLAGS="$(TARGET_CPPFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ $(3) \
+ $(PYTHON) ./setup.py $(2) \
+ );
+endef
--- /dev/null
+#
+# Copyright (C) 2007 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=yapsnmp
+PKG_VERSION:=0.7.8
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/$(PKG_NAME)
+PKG_MD5SUM:=8a3e9a5b814388d7907c639105cb2365
+
+include $(INCLUDE_DIR)/package.mk
+include ../python/python-package.mk
+
+define PyPackage/yapsnmp
+ TITLE:=Python interface to Net-SNMP
+ URL:=http://yapsnmp.sourceforge.net/
+ DEPENDS+= +libnetsnmp
+endef
+
+define PyPackage/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
++|$(PYTHON_PKG_DIR)/netsnmp.py
++|$(PYTHON_PKG_DIR)/netsnmpc.so
++|$(PYTHON_PKG_DIR)/yapsnmp.py
+endef
+
+CONFIGURE_ARGS += \
+ --enable-shared \
+ --enable-static \
+ --enable-site-packages-prefix="$(PYTHON_PKG_DIR)" \
+
+CONFIGURE_VARS += \
+ ac_cv_file__usr_include_net_snmp_library="yes" \
+
+define Build/Configure
+ $(call Build/Configure/Default)
+ $(call libtool_disable_rpath)
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ INCLUDES="-I$(PYTHON_INC_DIR)" \
+ SNMPINCDIR="$(STAGING_DIR)/usr/include/net-snmp/library" \
+ all
+ $(call libtool_fixup_libdir,$(PKG_INSTALL_DIR))
+ $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" install
+endef
+
+$(eval $(call PyPackage,yapsnmp))
--- /dev/null
+--- yapsnmp-0.7.8/configure 2004-03-08 05:21:26.000000000 -0600
++++ yapsnmp-0.7.8.new/configure 2007-07-19 15:19:03.712465556 -0500
+@@ -9291,7 +9291,7 @@
+ done
+
+
+-for PYTHONINCPATH in python2.3 python2.2 python2.1 python2.0 python1.6 python1.5
++for PYTHONINCPATH in python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5
+ do
+ as_ac_Header=`echo "ac_cv_header_$PYTHONINCPATH/Python.h" | $as_tr_sh`
+ if eval "test \"\${$as_ac_Header+set}\" = set"; then
+--- yapsnmp-0.7.8/src/mib.h-patch 2004-03-07 17:09:53.000000000 -0600
++++ yapsnmp-0.7.8.new/src/mib.h-patch 2007-07-19 15:12:46.266956163 -0500
+@@ -1,36 +1,11 @@
+-*** /usr/include/net-snmp/library/mib.h 2003-11-11 08:37:02.000000000 -0800
+---- mib.h 2004-03-07 14:59:47.000000000 -0800
+-***************
+-*** 127,133 ****
+- int get_wild_node(const char *, oid *, size_t *);
+- int get_node(const char *, oid *, size_t *);
+- oid *snmp_parse_oid(const char *, oid *, size_t *);
+-! struct tree *get_symbol(oid *, size_t, struct tree *, char *);
+- struct tree *get_tree(const oid *, size_t, struct tree *);
+- struct tree *get_tree_head(void);
+- void set_function(struct tree *);
+---- 127,133 ----
+- int get_wild_node(const char *, oid *, size_t *);
+- int get_node(const char *, oid *, size_t *);
+- oid *snmp_parse_oid(const char *, oid *, size_t *);
+-! /* struct tree *get_symbol(oid *, size_t, struct tree *, char *);*/
+- struct tree *get_tree(const oid *, size_t, struct tree *);
+- struct tree *get_tree_head(void);
+- void set_function(struct tree *);
+-***************
+-*** 482,488 ****
+- const char *parse_octet_hint(const char *hint, const char *value,
+- unsigned char **new_val, int *new_val_len);
+-
+-! void clear_tree_flags(register struct tree *tp);
+-
+- char *snmp_out_toggle_options(char *);
+- void snmp_out_toggle_options_usage(const char *, FILE *);
+---- 482,488 ----
+- const char *parse_octet_hint(const char *hint, const char *value,
+- unsigned char **new_val, int *new_val_len);
+-
+-! /* void clear_tree_flags(register struct tree *tp);*/
+-
+- char *snmp_out_toggle_options(char *);
+- void snmp_out_toggle_options_usage(const char *, FILE *);
++--- mib.h.old 2007-07-19 15:11:03.917123577 -0500
+++++ mib.h 2007-07-19 15:10:44.804034380 -0500
++@@ -498,7 +498,7 @@
++ const char *parse_octet_hint(const char *hint, const char *value,
++ unsigned char **new_val, int *new_val_len);
++
++- void clear_tree_flags(register struct tree *tp);
+++ /* void clear_tree_flags(register struct tree *tp); */
++
++ char *snmp_out_toggle_options(char *);
++ void snmp_out_toggle_options_usage(const char *, FILE *);
+--- yapsnmp-0.7.8/src/snmp_api.h-patch 2004-03-07 17:09:53.000000000 -0600
++++ yapsnmp-0.7.8.new/src/snmp_api.h-patch 2007-07-19 14:59:23.653217810 -0500
+@@ -1,147 +1,100 @@
+-*** /usr/include/net-snmp/library/snmp_api.h 2003-11-11 08:37:07.000000000 -0800
+---- snmp_api.h 2004-03-07 15:02:18.000000000 -0800
+-***************
+-*** 82,91 ****
+-
+- /*
+- * The actual transport domain. This SHOULD NOT BE FREE()D.
+-- */
+-
+- const oid *tDomain;
+- size_t tDomainLen;
+-
+- netsnmp_variable_list *variables;
+-
+---- 82,91 ----
+-
+- /*
+- * The actual transport domain. This SHOULD NOT BE FREE()D.
+-
+- const oid *tDomain;
+- size_t tDomainLen;
+-+ */
+-
+- netsnmp_variable_list *variables;
+-
+-***************
+-*** 152,158 ****
+- /*
+- * Authentication function or NULL if null authentication is used
+- */
+-! u_char *(*authenticator) (u_char *, size_t *, u_char *, size_t);
+- netsnmp_callback callback; /* Function to interpret incoming data */
+- /*
+- * Pointer to data that the callback function may consider important
+---- 152,158 ----
+- /*
+- * Authentication function or NULL if null authentication is used
+- */
+-! /* u_char *(*authenticator) (u_char *, size_t *, u_char *, size_t);*/
+- netsnmp_callback callback; /* Function to interpret incoming data */
+- /*
+- * Pointer to data that the callback function may consider important
+-***************
+-*** 384,391 ****
+---- 384,393 ----
+-
+- #define SNMPERR_MAX (-63)
+-
+-+ /*
+- #define non_repeaters errstat
+- #define max_repetitions errindex
+-+ */
+-
+- struct variable_list {
+- struct variable_list *next_variable; /* NULL for last variable */
+-***************
+-*** 410,416 ****
+- oid name_loc[MAX_OID_LEN]; /* 90 percentile < 24. */
+- u_char buf[40]; /* 90 percentile < 40. */
+- void *data; /* (Opaque) hook for additional data */
+-! void (*dataFreeHook)(void *); /* callback to free above */
+- int index;
+- };
+-
+---- 412,418 ----
+- oid name_loc[MAX_OID_LEN]; /* 90 percentile < 24. */
+- u_char buf[40]; /* 90 percentile < 40. */
+- void *data; /* (Opaque) hook for additional data */
+-! /* void (*dataFreeHook)(void *); */ /* callback to free above */
+- int index;
+- };
+-
+-***************
+-*** 601,608 ****
+- size_t);
+- int netsnmp_oid_equals(const oid *, size_t, const oid *,
+- size_t);
+-! int netsnmp_oid_tree_equals(const oid *, size_t, const oid *,
+-! size_t);
+- int netsnmp_oid_is_subtree(const oid *, size_t, const oid *,
+- size_t);
+- int netsnmp_oid_find_prefix(const oid * in_name1, size_t len1,
+---- 603,610 ----
+- size_t);
+- int netsnmp_oid_equals(const oid *, size_t, const oid *,
+- size_t);
+-! /* int netsnmp_oid_tree_equals(const oid *, size_t, const oid *,
+-! size_t);*/
+- int netsnmp_oid_is_subtree(const oid *, size_t, const oid *,
+- size_t);
+- int netsnmp_oid_find_prefix(const oid * in_name1, size_t len1,
+-***************
+-*** 619,629 ****
+---- 621,633 ----
++--- snmp_api.h.orig Fri Jan 7 17:06:46 2005
+++++ snmp_api.h Fri Jan 7 17:10:01 2005
++@@ -112,10 +112,10 @@
++
++ /**
++ * The actual transport domain. This SHOULD NOT BE FREE()D.
++- */
++
++ const oid *tDomain;
++ size_t tDomainLen;
+++ */
++
++ netsnmp_variable_list *variables;
++
++@@ -209,7 +209,7 @@
++ /**
++ * Authentication function or NULL if null authentication is used
++ */
++- u_char *(*authenticator) (u_char *, size_t *, u_char *, size_t);
+++ /* u_char *(*authenticator) (u_char *, size_t *, u_char *, size_t); */
++ /** Function to interpret incoming data */
++ netsnmp_callback callback;
++ /**
++@@ -487,8 +487,10 @@
++
++ #define SNMPERR_MAX (-63)
++
+++/*
++ #define non_repeaters errstat
++ #define max_repetitions errindex
+++*/
++
++ typedef union {
++ long *integer;
++@@ -530,7 +532,7 @@
++ /** (Opaque) hook for additional data */
++ void *data;
++ /** callback to free above */
++- void (*dataFreeHook)(void *);
+++ /* void (*dataFreeHook)(void *); */
++ int index;
++ };
++
++@@ -721,8 +723,8 @@
++ size_t);
++ int netsnmp_oid_equals(const oid *, size_t, const oid *,
++ size_t);
++- int netsnmp_oid_tree_equals(const oid *, size_t, const oid *,
++- size_t);
+++/* int netsnmp_oid_tree_equals(const oid *, size_t, const oid *,
+++ size_t);*/
++ int netsnmp_oid_is_subtree(const oid *, size_t, const oid *,
++ size_t);
++ int netsnmp_oid_find_prefix(const oid * in_name1, size_t len1,
++@@ -739,11 +741,13 @@
++ size_t * out_length,
++ u_char * pdu_data,
++ size_t pdu_data_len);
+++/*
++ int snmpv3_packet_rbuild(netsnmp_session *,
++ netsnmp_pdu *pdu, u_char * packet,
+ size_t * out_length,
+ u_char * pdu_data,
+ size_t pdu_data_len);
+-+ /*
+- int snmpv3_packet_rbuild(netsnmp_session *,
+- netsnmp_pdu *pdu, u_char * packet,
+- size_t * out_length,
+- u_char * pdu_data,
+- size_t pdu_data_len);
+-+ */
+- int snmpv3_make_report(netsnmp_pdu *pdu, int error);
+- int snmpv3_get_report_type(netsnmp_pdu *pdu);
+- int snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data,
+-***************
+-*** 672,677 ****
+---- 676,682 ----
+- * Extended open; fpre_parse has changed.
+- */
+-
+-+ /*
+- netsnmp_session *snmp_open_ex(netsnmp_session *,
+- int (*fpre_parse) (netsnmp_session *,
+- struct
+-***************
+-*** 689,694 ****
+---- 694,700 ----
+- netsnmp_pdu *, u_char **,
+- size_t *, size_t *),
+- int (*fcheck) (u_char *, size_t));
+-+ */
+-
+- /*
+- * provided for backwards compatability. Don't use these functions.
+-***************
+-*** 770,775 ****
+---- 776,782 ----
+- *
+- */
+-
+-+ /*
+- void *snmp_sess_add_ex(netsnmp_session *,
+- struct netsnmp_transport_s *,
+- int (*fpre_parse) (netsnmp_session *,
+-***************
+-*** 836,841 ****
+---- 843,849 ----
+- *, void *,
+- size_t)
+- );
+-+ */
+-
+- /*
+- * use return value from snmp_sess_open as void * parameter
+++*/
++ int snmpv3_make_report(netsnmp_pdu *pdu, int error);
++ int snmpv3_get_report_type(netsnmp_pdu *pdu);
++ int snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data,
++@@ -793,6 +797,7 @@
++ * Extended open; fpre_parse has changed.
++ */
++
+++ /*
++ netsnmp_session *snmp_open_ex(netsnmp_session *,
++ int (*fpre_parse) (netsnmp_session *,
++ struct
++@@ -810,6 +815,7 @@
++ netsnmp_pdu *, u_char **,
++ size_t *, size_t *),
++ int (*fcheck) (u_char *, size_t));
+++ */
++
++ /*
++ * provided for backwards compatability. Don't use these functions.
++@@ -891,6 +897,7 @@
++ *
++ */
++
+++ /*
++ void *snmp_sess_add_ex(netsnmp_session *,
++ struct netsnmp_transport_s *,
++ int (*fpre_parse) (netsnmp_session *,
++@@ -957,6 +964,7 @@
++ *, void *,
++ size_t)
++ );
+++ */
++
++ /*
++ * use return value from snmp_sess_open as void * parameter
+--- yapsnmp-0.7.8/configure.old 2007-07-19 16:27:36.126818690 -0500
++++ yapsnmp-0.7.8/configure 2007-07-19 16:28:12.692902474 -0500
+@@ -8816,7 +8816,7 @@
+ #define HAVE_LIBSNMP 1
+ _ACEOF
+
+- LIBS="-lsnmp $LIBS"
++ LIBS="-lnetsnmp $LIBS"
+
+ else
+ { { echo "$as_me:$LINENO: error: Couldn't find libsnmp" >&5
+--- yapsnmp-0.7.8/configure.old 2007-07-19 16:30:48.185763508 -0500
++++ yapsnmp-0.7.8/configure 2007-07-19 16:30:52.021982121 -0500
+@@ -8757,13 +8757,13 @@
+ fi
+
+
+-echo "$as_me:$LINENO: checking for init_snmp in -lsnmp" >&5
+-echo $ECHO_N "checking for init_snmp in -lsnmp... $ECHO_C" >&6
++echo "$as_me:$LINENO: checking for init_snmp in -lnetsnmp" >&5
++echo $ECHO_N "checking for init_snmp in -lnetsnmp... $ECHO_C" >&6
+ if test "${ac_cv_lib_snmp_init_snmp+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lsnmp $LIBS"
++LIBS="-lnetsnmp $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ #line $LINENO "configure"
+ /* confdefs.h. */
+++ /dev/null
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=egenix-mx
-PKG_VERSION:=2.0.6
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-base-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.egenix.com/files/python/
-PKG_MD5SUM:=66841151728a06f92d0b8dd2ed317a29
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-base-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/egenix-mx
- SECTION:=libs
- CATEGORY:=Libraries
- DEPENDS:=+python
- TITLE:=Egenix-mx
- MAINTAINER:=jjones@pavlovmedia.com
- DESCRIPTION:=\
- required library for psycopg (a PostgreSQL database adapter for the Python programming language).
- URL=http://www.initd.org/
-endef
-
-define Build/Compile
- cd $(PKG_BUILD_DIR); \
- BASECFLAGS='$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include' \
- CFLAGS='$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include' \
- LDFLAGS='$(TARGET_LDFLAGS)' \
- $(STAGING_DIR)/usr/bin/hostpython ./setup.py build \
- --build-lib=foo
-endef
-
-MX_SOURCE=$(PKG_BUILD_DIR)/mx
-MX_INSTALL_DIR=/usr/lib/python2.5/site-packages/mx
-define Package/egenix-mx/install
- # distutils insists on compiling, so we need to do an install by hand
- $(INSTALL_DIR) $(1)/usr/lib/python2.5/site-packages
- $(CP) -R $(PKG_BUILD_DIR)/foo/mx $(1)/usr/lib/python2.5/site-packages
- $(CP) $(1)$(MX_INSTALL_DIR)/BeeBase/ExitFunctions.py \
- $(1)$(MX_INSTALL_DIR)/Misc/ExitFunctions.py
-
- $(CP) \
- $(MX_SOURCE)/BeeBase/mxBeeBase/btr.h \
- $(MX_SOURCE)/BeeBase/mxBeeBase/mxBeeBase.h \
- $(MX_SOURCE)/BeeBase/mxBeeBase/mxh.h \
- $(1)$(MX_INSTALL_DIR)/BeeBase/mxBeeBase/
- $(CP) \
- $(MX_SOURCE)/DateTime/mxDateTime/mxDateTime.h \
- $(MX_SOURCE)/DateTime/mxDateTime/mxh.h \
- $(1)$(MX_INSTALL_DIR)/DateTime/mxDateTime/
- $(CP) \
- $(MX_SOURCE)/Proxy/mxProxy/mxh.h \
- $(MX_SOURCE)/Proxy/mxProxy/mxProxy.h \
- $(1)$(MX_INSTALL_DIR)/Proxy/mxProxy/
- $(CP) \
- $(MX_SOURCE)/Queue/mxQueue/mxh.h \
- $(MX_SOURCE)/Queue/mxQueue/mxQueue.h \
- $(1)$(MX_INSTALL_DIR)/Queue/mxQueue/
- $(CP) \
- $(MX_SOURCE)/TextTools/mxTextTools/mxbmse.h \
- $(MX_SOURCE)/TextTools/mxTextTools/mxh.h \
- $(MX_SOURCE)/TextTools/mxTextTools/mxte.h \
- $(MX_SOURCE)/TextTools/mxTextTools/mxTextTools.h \
- $(1)$(MX_INSTALL_DIR)/TextTools/mxTextTools/
- $(CP) \
- $(MX_SOURCE)/Tools/mxTools/mxh.h \
- $(MX_SOURCE)/Tools/mxTools/mxTools.h \
- $(1)$(MX_INSTALL_DIR)/Tools/mxTools/
-
- chmod -R a+r $(1)
-endef
-
-define Build/InstallDev
- $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/BeeBase/mxBeeBase
- $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/DateTime/mxDateTime
- $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/Proxy/mxProxy
- $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/Queue/mxQueue
- $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/TextTools/mxTextTools
- $(INSTALL_DIR) $(STAGING_DIR)$(MX_INSTALL_DIR)/Tools/mxTools
-
- $(CP) \
- $(MX_SOURCE)/BeeBase/mxBeeBase/btr.h \
- $(MX_SOURCE)/BeeBase/mxBeeBase/mxBeeBase.h \
- $(MX_SOURCE)/BeeBase/mxBeeBase/mxh.h \
- $(STAGING_DIR)$(MX_INSTALL_DIR)/BeeBase/mxBeeBase/
- $(CP) \
- $(MX_SOURCE)/DateTime/mxDateTime/mxDateTime.h \
- $(MX_SOURCE)/DateTime/mxDateTime/mxh.h \
- $(STAGING_DIR)$(MX_INSTALL_DIR)/DateTime/mxDateTime/
- $(CP) \
- $(MX_SOURCE)/Proxy/mxProxy/mxh.h \
- $(MX_SOURCE)/Proxy/mxProxy/mxProxy.h \
- $(STAGING_DIR)$(MX_INSTALL_DIR)/Proxy/mxProxy/
- $(CP) \
- $(MX_SOURCE)/Queue/mxQueue/mxh.h \
- $(MX_SOURCE)/Queue/mxQueue/mxQueue.h \
- $(STAGING_DIR)$(MX_INSTALL_DIR)/Queue/mxQueue/
- $(CP) \
- $(MX_SOURCE)/TextTools/mxTextTools/mxbmse.h \
- $(MX_SOURCE)/TextTools/mxTextTools/mxh.h \
- $(MX_SOURCE)/TextTools/mxTextTools/mxte.h \
- $(MX_SOURCE)/TextTools/mxTextTools/mxTextTools.h \
- $(STAGING_DIR)$(MX_INSTALL_DIR)/TextTools/mxTextTools/
- $(CP) \
- $(MX_SOURCE)/Tools/mxTools/mxh.h \
- $(MX_SOURCE)/Tools/mxTools/mxTools.h \
- $(STAGING_DIR)$(MX_INSTALL_DIR)/Tools/mxTools/
-endef
-
-$(eval $(call BuildPackage,egenix-mx))
+++ /dev/null
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=psycopg
-PKG_VERSION:=1.1.21
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.initd.org/pub/software/psycopg/
-PKG_MD5SUM:=a31f79f68d6d32898d6f24e11369a106
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/psycopg
- SECTION:=libs
- CATEGORY:=Libraries
- DEPENDS:=+libpq +python +egenix-mx
- TITLE:=Psycopg
- MAINTAINER:=jjones@pavlovmedia.com
- DESCRIPTION:=\
- psycopg is a PostgreSQL database adapter for the Python programming language.
- URL=http://www.initd.org/
-endef
-
-define Build/Compile
- $(MAKE) -C $(PKG_BUILD_DIR)
-endef
-
-define Build/Configure
- $(call Build/Configure/Default, \
- --with-python=$(STAGING_DIR)/usr/bin/hostpython \
- --with-postgres-libraries=$(STAGING_DIR)/usr/lib \
- --with-postgres-includes=$(STAGING_DIR)/usr/include \
- --with-mxdatetime-includes=$(STAGING_DIR)/usr/lib/python2.5/site-packages/mx/DateTime/mxDateTime )
-endef
-
-define Package/psycopg/install
- $(INSTALL_DIR) $(1)/usr/lib/python2.5/site-packages
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/psycopgmodule.so $(1)/usr/lib/python2.5/site-packages
-endef
-
-$(eval $(call BuildPackage,psycopg))
+++ /dev/null
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=pyevent
-PKG_VERSION:=0.3
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://pyevent.googlecode.com/files/
-PKG_MD5SUM:=584912c92d08bf005283fb29a47a6e4d
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/pyevent
- SECTION:=libs
- CATEGORY:=Libraries
- DEPENDS:=+libevent +python
- TITLE:=Pyevent
- MAINTAINER:=jjones@pavlovmedia.com
- DESCRIPTION:=\
- Python extension module for libevent
- URL=http://code.google.com/p/pyevent/
-endef
-
-define Build/Compile
- $(call Build/Compile/PyMod,\
- LIBEVENT_HOME='$(STAGING_DIR)/usr/lib' \
- ,\
- install \
- )
-endef
-
-define Package/pyevent/install
- $(CP) -R $(PKG_INSTALL_DIR)/* $(1)
-endef
-
-$(eval $(call BuildPackage,pyevent))
+++ /dev/null
-diff -ruN pyevent-0.3.pris/setup.py pyevent-0.3/setup.py
---- pyevent-0.3.pris/setup.py 2005-09-11 22:44:04.000000000 -0500
-+++ pyevent-0.3/setup.py 2007-04-23 11:17:14.500323500 -0500
-@@ -5,9 +5,13 @@
- from distutils.core import setup, Extension
- import glob, os, sys
-
--if glob.glob('/usr/lib/libevent.*'):
-- print 'found system libevent for', sys.platform
-- event = Extension(name='event',
-+# Where to find libevent
-+libevent_location = os.environ.get('LIBEVENT_HOME')
-+
-+if libevent_location != None:
-+ if glob.glob('%s/libevent.*' % (libevent_location,)):
-+ print 'found system libevent for', sys.platform
-+ event = Extension(name='event',
- sources=[ 'event.c' ],
- libraries=[ 'event' ])
- elif glob.glob('%s/lib/libevent.*' % sys.prefix):
+++ /dev/null
---- pyevent-0.3-old/event.pyx 2005-09-11 22:16:15.000000000 -0500
-+++ pyevent-0.3/event.pyx 2007-06-12 11:28:33.000000000 -0500
-@@ -259,7 +259,7 @@
- global __event_exc
- event_dispatch()
- if __event_exc:
-- raise __event_exc[0], __event_exc[1], __event_exc[2]
-+ raise OSError, "%s [%s]" % (__event_exc[0], __event_exc[1]), __event_exc[2]
-
- def loop(nonblock=False):
- """Dispatch all pending events on queue in a single pass."""
+++ /dev/null
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=pysqlite
-PKG_VERSION:=2.3.5
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://initd.org/pub/software/pysqlite/releases/2.3/2.3.5/
-PKG_MD5SUM:=b4a185e936848370fcc1a5b17755b641
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/pysqlite
- SECTION:=libs
- CATEGORY:=Libraries
- DEPENDS:=+libsqlite3 +python
- TITLE:=Pysqlite
- DESCRIPTION:=\
- pysqlite is a sqlite database adapter for the Python programming language.
- URL=http://www.initd.org/tracker/pysqlite/wiki/pysqlite
-endef
-
-define Build/Compile
- $(call Build/Compile/PyMod,,install)
-endef
-
-define Package/pysqlite/install
- $(CP) -R $(PKG_INSTALL_DIR)/* $(1)
-endef
-
-$(eval $(call BuildPackage,pysqlite))
+++ /dev/null
-#
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=yapsnmp
-PKG_VERSION:=0.7.8
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_MD5SUM:=8a3e9a5b814388d7907c639105cb2365
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/yapsnmp
- SECTION:=libs
- CATEGORY:=Libraries
- TITLE:=Python SNMP module
- DEPENDS:=+libnetsnmp +python
- DESCRIPTION:=\
- yapsnmp is 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.
- URL:=http://yapsnmp.sourceforge.net/
-endef
-
-
-define Build/Configure
- $(call Build/Configure/Default, \
- --includedir="$(STAGING_DIR)/usr/include" \
- --oldincludedir="$(STAGING_DIR)/usr/include" \
- --enable-shared \
- --enable-static \
- )
-endef
-
-define Build/Compile
- $(SED) 's#^oldincludedir.*#oldincludedir = $(STAGING_DIR)/usr/include#' \
- $(PKG_BUILD_DIR)/src/Makefile
- $(SED) 's#^sys_lib_search_path_spec.*#sys_lib_search_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib"#' \
- $(PKG_BUILD_DIR)/libtool
- $(MAKE) -C $(PKG_BUILD_DIR) \
- SNMPINCDIR="$(STAGING_DIR)/usr/include/net-snmp/library" \
- includedir="$(STAGING_DIR)/usr/include" \
- DESTDIR=$(PKG_INSTALL_DIR) \
- all install
-endef
-
-ifeq ($(DUMP),)
- pylibdir:=$(shell $(STAGING_DIR)/usr/bin/hostpython $(SCRIPT_DIR)/pylibdir.py)
-endif
-define Package/yapsnmp/install
- $(INSTALL_DIR) $(1)$(pylibdir)
- $(CP) -a $(PKG_INSTALL_DIR)/* $(1)$(pylibdir)
-endef
-
-$(eval $(call BuildPackage,yapsnmp))
+++ /dev/null
---- yapsnmp-0.7.8/configure 2004-03-08 05:21:26.000000000 -0600
-+++ yapsnmp-0.7.8.new/configure 2007-07-19 15:19:03.712465556 -0500
-@@ -9291,7 +9291,7 @@
- done
-
-
--for PYTHONINCPATH in python2.3 python2.2 python2.1 python2.0 python1.6 python1.5
-+for PYTHONINCPATH in python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5
- do
- as_ac_Header=`echo "ac_cv_header_$PYTHONINCPATH/Python.h" | $as_tr_sh`
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
---- yapsnmp-0.7.8/src/mib.h-patch 2004-03-07 17:09:53.000000000 -0600
-+++ yapsnmp-0.7.8.new/src/mib.h-patch 2007-07-19 15:12:46.266956163 -0500
-@@ -1,36 +1,11 @@
--*** /usr/include/net-snmp/library/mib.h 2003-11-11 08:37:02.000000000 -0800
----- mib.h 2004-03-07 14:59:47.000000000 -0800
--***************
--*** 127,133 ****
-- int get_wild_node(const char *, oid *, size_t *);
-- int get_node(const char *, oid *, size_t *);
-- oid *snmp_parse_oid(const char *, oid *, size_t *);
--! struct tree *get_symbol(oid *, size_t, struct tree *, char *);
-- struct tree *get_tree(const oid *, size_t, struct tree *);
-- struct tree *get_tree_head(void);
-- void set_function(struct tree *);
----- 127,133 ----
-- int get_wild_node(const char *, oid *, size_t *);
-- int get_node(const char *, oid *, size_t *);
-- oid *snmp_parse_oid(const char *, oid *, size_t *);
--! /* struct tree *get_symbol(oid *, size_t, struct tree *, char *);*/
-- struct tree *get_tree(const oid *, size_t, struct tree *);
-- struct tree *get_tree_head(void);
-- void set_function(struct tree *);
--***************
--*** 482,488 ****
-- const char *parse_octet_hint(const char *hint, const char *value,
-- unsigned char **new_val, int *new_val_len);
--
--! void clear_tree_flags(register struct tree *tp);
--
-- char *snmp_out_toggle_options(char *);
-- void snmp_out_toggle_options_usage(const char *, FILE *);
----- 482,488 ----
-- const char *parse_octet_hint(const char *hint, const char *value,
-- unsigned char **new_val, int *new_val_len);
--
--! /* void clear_tree_flags(register struct tree *tp);*/
--
-- char *snmp_out_toggle_options(char *);
-- void snmp_out_toggle_options_usage(const char *, FILE *);
-+--- mib.h.old 2007-07-19 15:11:03.917123577 -0500
-++++ mib.h 2007-07-19 15:10:44.804034380 -0500
-+@@ -498,7 +498,7 @@
-+ const char *parse_octet_hint(const char *hint, const char *value,
-+ unsigned char **new_val, int *new_val_len);
-+
-+- void clear_tree_flags(register struct tree *tp);
-++ /* void clear_tree_flags(register struct tree *tp); */
-+
-+ char *snmp_out_toggle_options(char *);
-+ void snmp_out_toggle_options_usage(const char *, FILE *);
---- yapsnmp-0.7.8/src/snmp_api.h-patch 2004-03-07 17:09:53.000000000 -0600
-+++ yapsnmp-0.7.8.new/src/snmp_api.h-patch 2007-07-19 14:59:23.653217810 -0500
-@@ -1,147 +1,100 @@
--*** /usr/include/net-snmp/library/snmp_api.h 2003-11-11 08:37:07.000000000 -0800
----- snmp_api.h 2004-03-07 15:02:18.000000000 -0800
--***************
--*** 82,91 ****
--
-- /*
-- * The actual transport domain. This SHOULD NOT BE FREE()D.
--- */
--
-- const oid *tDomain;
-- size_t tDomainLen;
--
-- netsnmp_variable_list *variables;
--
----- 82,91 ----
--
-- /*
-- * The actual transport domain. This SHOULD NOT BE FREE()D.
--
-- const oid *tDomain;
-- size_t tDomainLen;
--+ */
--
-- netsnmp_variable_list *variables;
--
--***************
--*** 152,158 ****
-- /*
-- * Authentication function or NULL if null authentication is used
-- */
--! u_char *(*authenticator) (u_char *, size_t *, u_char *, size_t);
-- netsnmp_callback callback; /* Function to interpret incoming data */
-- /*
-- * Pointer to data that the callback function may consider important
----- 152,158 ----
-- /*
-- * Authentication function or NULL if null authentication is used
-- */
--! /* u_char *(*authenticator) (u_char *, size_t *, u_char *, size_t);*/
-- netsnmp_callback callback; /* Function to interpret incoming data */
-- /*
-- * Pointer to data that the callback function may consider important
--***************
--*** 384,391 ****
----- 384,393 ----
--
-- #define SNMPERR_MAX (-63)
--
--+ /*
-- #define non_repeaters errstat
-- #define max_repetitions errindex
--+ */
--
-- struct variable_list {
-- struct variable_list *next_variable; /* NULL for last variable */
--***************
--*** 410,416 ****
-- oid name_loc[MAX_OID_LEN]; /* 90 percentile < 24. */
-- u_char buf[40]; /* 90 percentile < 40. */
-- void *data; /* (Opaque) hook for additional data */
--! void (*dataFreeHook)(void *); /* callback to free above */
-- int index;
-- };
--
----- 412,418 ----
-- oid name_loc[MAX_OID_LEN]; /* 90 percentile < 24. */
-- u_char buf[40]; /* 90 percentile < 40. */
-- void *data; /* (Opaque) hook for additional data */
--! /* void (*dataFreeHook)(void *); */ /* callback to free above */
-- int index;
-- };
--
--***************
--*** 601,608 ****
-- size_t);
-- int netsnmp_oid_equals(const oid *, size_t, const oid *,
-- size_t);
--! int netsnmp_oid_tree_equals(const oid *, size_t, const oid *,
--! size_t);
-- int netsnmp_oid_is_subtree(const oid *, size_t, const oid *,
-- size_t);
-- int netsnmp_oid_find_prefix(const oid * in_name1, size_t len1,
----- 603,610 ----
-- size_t);
-- int netsnmp_oid_equals(const oid *, size_t, const oid *,
-- size_t);
--! /* int netsnmp_oid_tree_equals(const oid *, size_t, const oid *,
--! size_t);*/
-- int netsnmp_oid_is_subtree(const oid *, size_t, const oid *,
-- size_t);
-- int netsnmp_oid_find_prefix(const oid * in_name1, size_t len1,
--***************
--*** 619,629 ****
----- 621,633 ----
-+--- snmp_api.h.orig Fri Jan 7 17:06:46 2005
-++++ snmp_api.h Fri Jan 7 17:10:01 2005
-+@@ -112,10 +112,10 @@
-+
-+ /**
-+ * The actual transport domain. This SHOULD NOT BE FREE()D.
-+- */
-+
-+ const oid *tDomain;
-+ size_t tDomainLen;
-++ */
-+
-+ netsnmp_variable_list *variables;
-+
-+@@ -209,7 +209,7 @@
-+ /**
-+ * Authentication function or NULL if null authentication is used
-+ */
-+- u_char *(*authenticator) (u_char *, size_t *, u_char *, size_t);
-++ /* u_char *(*authenticator) (u_char *, size_t *, u_char *, size_t); */
-+ /** Function to interpret incoming data */
-+ netsnmp_callback callback;
-+ /**
-+@@ -487,8 +487,10 @@
-+
-+ #define SNMPERR_MAX (-63)
-+
-++/*
-+ #define non_repeaters errstat
-+ #define max_repetitions errindex
-++*/
-+
-+ typedef union {
-+ long *integer;
-+@@ -530,7 +532,7 @@
-+ /** (Opaque) hook for additional data */
-+ void *data;
-+ /** callback to free above */
-+- void (*dataFreeHook)(void *);
-++ /* void (*dataFreeHook)(void *); */
-+ int index;
-+ };
-+
-+@@ -721,8 +723,8 @@
-+ size_t);
-+ int netsnmp_oid_equals(const oid *, size_t, const oid *,
-+ size_t);
-+- int netsnmp_oid_tree_equals(const oid *, size_t, const oid *,
-+- size_t);
-++/* int netsnmp_oid_tree_equals(const oid *, size_t, const oid *,
-++ size_t);*/
-+ int netsnmp_oid_is_subtree(const oid *, size_t, const oid *,
-+ size_t);
-+ int netsnmp_oid_find_prefix(const oid * in_name1, size_t len1,
-+@@ -739,11 +741,13 @@
-+ size_t * out_length,
-+ u_char * pdu_data,
-+ size_t pdu_data_len);
-++/*
-+ int snmpv3_packet_rbuild(netsnmp_session *,
-+ netsnmp_pdu *pdu, u_char * packet,
- size_t * out_length,
- u_char * pdu_data,
- size_t pdu_data_len);
--+ /*
-- int snmpv3_packet_rbuild(netsnmp_session *,
-- netsnmp_pdu *pdu, u_char * packet,
-- size_t * out_length,
-- u_char * pdu_data,
-- size_t pdu_data_len);
--+ */
-- int snmpv3_make_report(netsnmp_pdu *pdu, int error);
-- int snmpv3_get_report_type(netsnmp_pdu *pdu);
-- int snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data,
--***************
--*** 672,677 ****
----- 676,682 ----
-- * Extended open; fpre_parse has changed.
-- */
--
--+ /*
-- netsnmp_session *snmp_open_ex(netsnmp_session *,
-- int (*fpre_parse) (netsnmp_session *,
-- struct
--***************
--*** 689,694 ****
----- 694,700 ----
-- netsnmp_pdu *, u_char **,
-- size_t *, size_t *),
-- int (*fcheck) (u_char *, size_t));
--+ */
--
-- /*
-- * provided for backwards compatability. Don't use these functions.
--***************
--*** 770,775 ****
----- 776,782 ----
-- *
-- */
--
--+ /*
-- void *snmp_sess_add_ex(netsnmp_session *,
-- struct netsnmp_transport_s *,
-- int (*fpre_parse) (netsnmp_session *,
--***************
--*** 836,841 ****
----- 843,849 ----
-- *, void *,
-- size_t)
-- );
--+ */
--
-- /*
-- * use return value from snmp_sess_open as void * parameter
-++*/
-+ int snmpv3_make_report(netsnmp_pdu *pdu, int error);
-+ int snmpv3_get_report_type(netsnmp_pdu *pdu);
-+ int snmp_pdu_parse(netsnmp_pdu *pdu, u_char * data,
-+@@ -793,6 +797,7 @@
-+ * Extended open; fpre_parse has changed.
-+ */
-+
-++ /*
-+ netsnmp_session *snmp_open_ex(netsnmp_session *,
-+ int (*fpre_parse) (netsnmp_session *,
-+ struct
-+@@ -810,6 +815,7 @@
-+ netsnmp_pdu *, u_char **,
-+ size_t *, size_t *),
-+ int (*fcheck) (u_char *, size_t));
-++ */
-+
-+ /*
-+ * provided for backwards compatability. Don't use these functions.
-+@@ -891,6 +897,7 @@
-+ *
-+ */
-+
-++ /*
-+ void *snmp_sess_add_ex(netsnmp_session *,
-+ struct netsnmp_transport_s *,
-+ int (*fpre_parse) (netsnmp_session *,
-+@@ -957,6 +964,7 @@
-+ *, void *,
-+ size_t)
-+ );
-++ */
-+
-+ /*
-+ * use return value from snmp_sess_open as void * parameter
---- yapsnmp-0.7.8/configure.old 2007-07-19 16:27:36.126818690 -0500
-+++ yapsnmp-0.7.8/configure 2007-07-19 16:28:12.692902474 -0500
-@@ -8816,7 +8816,7 @@
- #define HAVE_LIBSNMP 1
- _ACEOF
-
-- LIBS="-lsnmp $LIBS"
-+ LIBS="-lnetsnmp $LIBS"
-
- else
- { { echo "$as_me:$LINENO: error: Couldn't find libsnmp" >&5
---- yapsnmp-0.7.8/configure.old 2007-07-19 16:30:48.185763508 -0500
-+++ yapsnmp-0.7.8/configure 2007-07-19 16:30:52.021982121 -0500
-@@ -8757,13 +8757,13 @@
- fi
-
-
--echo "$as_me:$LINENO: checking for init_snmp in -lsnmp" >&5
--echo $ECHO_N "checking for init_snmp in -lsnmp... $ECHO_C" >&6
-+echo "$as_me:$LINENO: checking for init_snmp in -lnetsnmp" >&5
-+echo $ECHO_N "checking for init_snmp in -lnetsnmp... $ECHO_C" >&6
- if test "${ac_cv_lib_snmp_init_snmp+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lsnmp $LIBS"
-+LIBS="-lnetsnmp $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
- #line $LINENO "configure"
- /* confdefs.h. */
---- yapsnmp-0.7.8/configure.old 2007-07-19 16:31:52.277415884 -0500
-+++ yapsnmp-0.7.8/configure 2007-07-19 16:36:41.477896480 -0500
-@@ -9262,35 +9262,6 @@
-
- done
-
--
--for TEMP in $oldincludedir $ac_default_prefix/include $prefix/include
--do
-- SNMPINCDIR=$TEMP/$NETINCL
-- as_ac_File=`echo "ac_cv_file_$SNMPINCDIR" | $as_tr_sh`
--echo "$as_me:$LINENO: checking for $SNMPINCDIR" >&5
--echo $ECHO_N "checking for $SNMPINCDIR... $ECHO_C" >&6
--if eval "test \"\${$as_ac_File+set}\" = set"; then
-- echo $ECHO_N "(cached) $ECHO_C" >&6
--else
-- test "$cross_compiling" = yes &&
-- { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
--echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-- { (exit 1); exit 1; }; }
--if test -r "$SNMPINCDIR"; then
-- eval "$as_ac_File=yes"
--else
-- eval "$as_ac_File=no"
--fi
--fi
--echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
--echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
--if test `eval echo '${'$as_ac_File'}'` = yes; then
-- break
--fi
--
--done
--
--
- for PYTHONINCPATH in python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5
- do
- as_ac_Header=`echo "ac_cv_header_$PYTHONINCPATH/Python.h" | $as_tr_sh`
---- yapsnmp-0.7.8/configure.old 2007-07-19 16:37:52.729956905 -0500
-+++ yapsnmp-0.7.8/configure 2007-07-19 16:39:47.880518956 -0500
-@@ -9406,35 +9406,6 @@
- if test "${enable_site_packages_prefix+set}" = set; then
- enableval="$enable_site_packages_prefix"
- SITEPACKAGE=\$\(exec_prefix\)/lib/$PYTHONINCPATH/site-packages
--else
--
--for TEMP in /usr/lib $ac_default_prefix/lib $prefix/lib
--do
-- SITEPACKAGE=$TEMP/$PYTHONINCPATH/site-packages
-- as_ac_File=`echo "ac_cv_file_$SITEPACKAGE" | $as_tr_sh`
--echo "$as_me:$LINENO: checking for $SITEPACKAGE" >&5
--echo $ECHO_N "checking for $SITEPACKAGE... $ECHO_C" >&6
--if eval "test \"\${$as_ac_File+set}\" = set"; then
-- echo $ECHO_N "(cached) $ECHO_C" >&6
--else
-- test "$cross_compiling" = yes &&
-- { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
--echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-- { (exit 1); exit 1; }; }
--if test -r "$SITEPACKAGE"; then
-- eval "$as_ac_File=yes"
--else
-- eval "$as_ac_File=no"
--fi
--fi
--echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_File'}'`" >&5
--echo "${ECHO_T}`eval echo '${'$as_ac_File'}'`" >&6
--if test `eval echo '${'$as_ac_File'}'` = yes; then
-- break
--fi
--
--done
--
- fi;
-
-
---- yapsnmp-0.7.8/src/Makefile.in.old 2007-07-19 21:38:20.589306061 -0500
-+++ yapsnmp-0.7.8/src/Makefile.in 2007-07-19 21:38:37.290257791 -0500
-@@ -180,7 +180,7 @@
- rm -f "$${dir}/so_locations"; \
- done
- netsnmpc.la: $(netsnmpc_la_OBJECTS) $(netsnmpc_la_DEPENDENCIES)
-- $(LINK) -rpath $(libdir) $(netsnmpc_la_LDFLAGS) $(netsnmpc_la_OBJECTS) $(netsnmpc_la_LIBADD) $(LIBS)
-+ $(LINK) -rpath /usr/lib $(netsnmpc_la_LDFLAGS) $(netsnmpc_la_OBJECTS) $(netsnmpc_la_LIBADD) $(LIBS)
-
- mostlyclean-compile:
- -rm -f *.$(OBJEXT) core *.core
+++ /dev/null
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=pypcap
-PKG_VERSION:=1.1
-PKG_RELEASE:=1
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://pypcap.googlecode.com/files
-PKG_CAT:=zcat
-
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
-
-include $(INCLUDE_DIR)/package.mk
-
-define Package/pypcap
- DEPENDS:=+python +libpcap
- SECTION:=net
- CATEGORY:=Network
- TITLE:=pypcap
- DESCRIPTION:=\
- pypcap
- URL:=http://www
-endef
-
-define Build/Compile
- $(call Build/Compile/PyMod,\
- PCAP_HOME=$(STAGING_DIR)/usr \
- ,\
- install \
- )
-endef
-
-define Package/pypcap/install
- cd $(PKG_BUILD_DIR); \
- $(STAGING_DIR)/usr/bin/hostpython ./setup.py install \
- --no-compile --prefix $(PKG_INSTALL_DIR)/usr
- cp -a $(PKG_INSTALL_DIR)/* $(1)/
-endef
-
-$(eval $(call BuildPackage,pypcap))
+++ /dev/null
---- pypcap/setup.py 2006-03-15 13:59:54.000000000 -0600
-+++ pypcap.new/setup.py 2007-05-25 17:29:02.413355500 -0500
-@@ -4,69 +4,53 @@
-
- from distutils.core import setup, Extension
- from distutils.command import config, clean
--import cPickle, glob, os, sys
-+import os,sys,glob
-
--pcap_config = {}
--pcap_cache = 'config.pkl'
-+# where to find pcap
-+pcap_location = os.environ.get('PCAP_HOME')
-
--class config_pcap(config.config):
-- description = 'configure pcap paths'
-- user_options = [ ('with-pcap=', None,
-- 'path to pcap build or installation directory') ]
--
-- def initialize_options(self):
-- config.config.initialize_options(self)
-- self.dump_source = 0
-- #self.noisy = 0
-- self.with_pcap = None
--
-- def _write_config_h(self, cfg):
-- # XXX - write out config.h for pcap_ex.c
-- d = {}
-- if os.path.exists(os.path.join(cfg['include_dirs'][0], 'pcap-int.h')):
-- d['HAVE_PCAP_INT_H'] = 1
-- buf = open(os.path.join(cfg['include_dirs'][0], 'pcap.h')).read()
-- if buf.find('pcap_file(') != -1:
-- d['HAVE_PCAP_FILE'] = 1
-- if buf.find('pcap_compile_nopcap(') != -1:
-- d['HAVE_PCAP_COMPILE_NOPCAP'] = 1
-- if buf.find('pcap_setnonblock(') != -1:
-- d['HAVE_PCAP_SETNONBLOCK'] = 1
-- f = open('config.h', 'w')
-- for k, v in d.iteritems():
-- f.write('#define %s %s\n' % (k, v))
--
-- def _pcap_config(self, dirs=[ None ]):
-- cfg = {}
-- if not dirs[0]:
-- dirs = [ '/usr', sys.prefix ] + glob.glob('/opt/libpcap*') + \
-- glob.glob('../libpcap*') + glob.glob('../wpdpack*')
-- for d in dirs:
-- for sd in ('include', 'include/pcap', ''):
-- incdirs = [ os.path.join(d, sd) ]
-- if os.path.exists(os.path.join(d, sd, 'pcap.h')):
-- cfg['include_dirs'] = [ os.path.join(d, sd) ]
-- for sd in ('lib', ''):
-- for lib in (('pcap', 'libpcap.a'),
-- ('pcap', 'libpcap.dylib'),
-- ('wpcap', 'wpcap.lib')):
-- if os.path.exists(os.path.join(d, sd, lib[1])):
-- cfg['library_dirs'] = [ os.path.join(d, sd) ]
-- cfg['libraries'] = [ lib[0] ]
-- if lib[0] == 'wpcap':
-- cfg['libraries'].append('iphlpapi')
-- cfg['extra_compile_args'] = \
-- [ '-DWIN32', '-DWPCAP' ]
-- print 'found', cfg
-- self._write_config_h(cfg)
-- return cfg
-- raise "couldn't find pcap build or installation directory"
--
-- def run(self):
-- #config.log.set_verbosity(0)
-- cPickle.dump(self._pcap_config([ self.with_pcap ]),
-- open(pcap_cache, 'wb'))
-- self.temp_files.append(pcap_cache)
-+def write_config_h(cfg):
-+ # XXX - write out config.h for pcap_ex.c
-+ d = {}
-+ if os.path.exists(os.path.join(cfg['include_dirs'][0], 'pcap-int.h')):
-+ d['HAVE_PCAP_INT_H'] = 1
-+ buf = open(os.path.join(cfg['include_dirs'][0], 'pcap.h')).read()
-+ if buf.find('pcap_file(') != -1:
-+ d['HAVE_PCAP_FILE'] = 1
-+ if buf.find('pcap_compile_nopcap(') != -1:
-+ d['HAVE_PCAP_COMPILE_NOPCAP'] = 1
-+ if buf.find('pcap_setnonblock(') != -1:
-+ d['HAVE_PCAP_SETNONBLOCK'] = 1
-+ f = open('config.h', 'w')
-+ for k, v in d.iteritems():
-+ f.write('#define %s %s\n' % (k, v))
-+
-+
-+def f_pcap_config(dirs=[ None ]):
-+ cfg = {}
-+ if not dirs[0]:
-+ dirs = [ '/usr', sys.prefix ] + glob.glob('/opt/libpcap*') + \
-+ glob.glob('../libpcap*') + glob.glob('../wpdpack*')
-+ for d in dirs:
-+ for sd in ('include', 'include/pcap', ''):
-+ incdirs = [ os.path.join(d, sd) ]
-+ if os.path.exists(os.path.join(d, sd, 'pcap.h')):
-+ cfg['include_dirs'] = [ os.path.join(d, sd) ]
-+ for sd in ('lib', ''):
-+ for lib in (('pcap', 'libpcap.a'),
-+ ('pcap', 'libpcap.dylib'),
-+ ('wpcap', 'wpcap.lib')):
-+ if os.path.exists(os.path.join(d, sd, lib[1])):
-+ cfg['library_dirs'] = [ os.path.join(d, sd) ]
-+ cfg['libraries'] = [ lib[0] ]
-+ if lib[0] == 'wpcap':
-+ cfg['libraries'].append('iphlpapi')
-+ cfg['extra_compile_args'] = \
-+ [ '-DWIN32', '-DWPCAP' ]
-+ print 'found', cfg
-+ write_config_h(cfg)
-+ return cfg
-+ raise "couldn't find pcap build or installation directory"
-
- class clean_pcap(clean.clean):
- def run(self):
-@@ -75,13 +59,9 @@
- print "removing '%s'" % pcap_cache
- os.unlink(pcap_cache)
-
--if len(sys.argv) > 1 and sys.argv[1] == 'build':
-- try:
-- pcap_config = cPickle.load(open(pcap_cache))
-- except IOError:
-- print >>sys.stderr, 'run "%s config" first!' % sys.argv[0]
-- sys.exit(1)
-
-+
-+pcap_config = f_pcap_config([pcap_location])
- pcap = Extension(name='pcap',
- sources=[ 'pcap.c', 'pcap_ex.c' ],
- include_dirs=pcap_config.get('include_dirs', ''),
-@@ -89,7 +69,7 @@
- libraries=pcap_config.get('libraries', ''),
- extra_compile_args=pcap_config.get('extra_compile_args', ''))
-
--pcap_cmds = { 'config':config_pcap, 'clean':clean_pcap }
-+pcap_cmds = { 'clean':clean_pcap }
-
- setup(name='pcap',
- version='1.1',
+++ /dev/null
---- pypcap-1.1-old/pcap.pyx 2005-10-16 18:00:11.000000000 -0500
-+++ pypcap-1.1/pcap.pyx 2007-06-12 11:11:41.000000000 -0500
-@@ -285,7 +285,7 @@
- <unsigned char *>&ctx)
- if ctx.got_exc:
- exc = sys.exc_info()
-- raise exc[0], exc[1], exc[2]
-+ raise OSError, "%s [%s]" % (exc[0], exc[1]), exc[2]
- return n
-
- def loop(self, callback, *args):