c67ead9f7631ead2948ea8a7468d49c7f68b7f71
[openwrt/svn-archive/archive.git] / libs / yapsnmp / Makefile
1 #
2 #
3
4 include $(TOPDIR)/rules.mk
5
6 PKG_NAME:=yapsnmp
7 PKG_VERSION:=0.7.8
8 PKG_RELEASE:=1
9
10 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
11 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
12 PKG_MD5SUM:=8a3e9a5b814388d7907c639105cb2365
13 PKG_CAT:=zcat
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16
17 include $(INCLUDE_DIR)/package.mk
18
19 define Package/yapsnmp
20 SECTION:=libs
21 CATEGORY:=Libraries
22 TITLE:=Python SNMP module
23 DEPENDS:=+libnetsnmp +python
24 DESCRIPTION:=\
25 yapsnmp is a Python SNMP module based on the net-snmp (formerly known \\\
26 as ucd-snmp) library. It's composed of a low level interface to the \\\
27 library, created using SWIG, and a higher level python module \\\
28 removing all the complexity out of dealing with SNMP.
29 URL:=http://yapsnmp.sourceforge.net/
30 endef
31
32
33 define Build/Configure
34 $(call Build/Configure/Default, \
35 --includedir="$(STAGING_DIR)/usr/include" \
36 --oldincludedir="$(STAGING_DIR)/usr/include" \
37 --enable-shared \
38 --enable-static \
39 )
40 endef
41
42 define Build/Compile
43 $(SED) 's#^oldincludedir.*#oldincludedir = $(STAGING_DIR)/usr/include#' \
44 $(PKG_BUILD_DIR)/src/Makefile
45 $(SED) 's#^sys_lib_search_path_spec.*#sys_lib_search_path_spec="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib"#' \
46 $(PKG_BUILD_DIR)/libtool
47 $(MAKE) -C $(PKG_BUILD_DIR) \
48 SNMPINCDIR="$(STAGING_DIR)/usr/include/net-snmp/library" \
49 includedir="$(STAGING_DIR)/usr/include" \
50 DESTDIR=$(PKG_INSTALL_DIR) \
51 all install
52 endef
53
54 ifeq ($(DUMP),)
55 pylibdir:=$(shell $(STAGING_DIR)/usr/bin/hostpython $(SCRIPT_DIR)/pylibdir.py)
56 endif
57 define Package/yapsnmp/install
58 $(INSTALL_DIR) $(1)$(pylibdir)
59 $(CP) -a $(PKG_INSTALL_DIR)/* $(1)$(pylibdir)
60 endef
61
62 $(eval $(call BuildPackage,yapsnmp))