Explorar el Código

python-ldap: added python-ldap package

Signed-off-by: Dimtrij Trefilov <the-alien@live.ru>
alien hace 9 años
padre
commit
98bc21b08e
Se han modificado 2 ficheros con 75 adiciones y 0 borrados
  1. 59
    0
      lang/python-ldap/Makefile
  2. 16
    0
      lang/python-ldap/patches/010-setup_cfg.patch

+ 59
- 0
lang/python-ldap/Makefile Ver fichero

@@ -0,0 +1,59 @@
1
+#
2
+# Copyright (C) 2015 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=python-ldap
11
+PKG_VERSION:=2.4.20
12
+PKG_RELEASE:=1
13
+PKG_MAINTAINER:=Dmitry Trefilov <the-alien@live.ru>
14
+PKG_LICENSE:=Python-style
15
+PKG_LICENSE_FILES:=LICENSE
16
+
17
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
18
+PKG_SOURCE_URL:=https://pypi.python.org/packages/source/p/$(PKG_NAME)
19
+PKG_MD5SUM:=f98ecd0581766a43954ba0f218053032
20
+
21
+PKG_BUILD_DEPENDS:=python libopenldap
22
+
23
+include $(INCLUDE_DIR)/package.mk
24
+$(call include_mk, python-package.mk)
25
+
26
+define Package/python-ldap
27
+  SUBMENU:=Python
28
+  SECTION:=lang
29
+  CATEGORY:=Languages
30
+  DEPENDS:=+libopenldap +python
31
+  TITLE:=Python modules for implementing LDAP clients
32
+  URL:=http://python-ldap.org/
33
+endef
34
+
35
+define Package/python-ldap/description
36
+  python-ldap provides an object-oriented API to access LDAP directory
37
+  servers from Python programs. Mainly it wraps the OpenLDAP 2.x libs
38
+  for that purpose. Additionally the package contains modules for
39
+  other LDAP-related stuff (e.g. processing LDIF, LDAPURLs, LDAPv3
40
+  schema, LDAPv3 extended operations and controls, etc.).
41
+endef
42
+
43
+define Build/Compile
44
+	$(call Build/Compile/PyMod,,build_ext \
45
+		--include-dirs="$(STAGING_DIR)/usr/include:$(STAGING_DIR)/usr/include/sasl" \
46
+		--library-dirs="$(STAGING_DIR)/usr/lib:$(STAGING_DIR)/usr/lib/sasl2" \
47
+	build_py \
48
+	install --prefix="$(PKG_INSTALL_DIR)/usr")
49
+endef
50
+
51
+define PyPackage/python-ldap/install
52
+	$(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
53
+	$(CP) \
54
+	    $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
55
+	    $(1)$(PYTHON_PKG_DIR)
56
+endef
57
+
58
+$(eval $(call PyPackage,python-ldap))
59
+$(eval $(call BuildPackage,python-ldap))

+ 16
- 0
lang/python-ldap/patches/010-setup_cfg.patch Ver fichero

@@ -0,0 +1,16 @@
1
+From: Dmitrij Trefilov <the-alien@live.ru>
2
+
3
+Subject: [PATCH] lang: removed hardcoded include and library directories from setup.cfg
4
+Signed-off-by: Dmitrij Trefilov <the-alien@live.ru>
5
+---
6
+--- a/setup.cfg
7
++++ b/setup.cfg
8
+@@ -1,6 +1,6 @@
9
+ [_ldap]
10
+-library_dirs = /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64
11
+-include_dirs = /usr/include /usr/include/sasl /usr/local/include /usr/local/include/sasl
12
++library_dirs = 
13
++include_dirs = 
14
+ defines = HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
15
+ extra_compile_args = 
16
+ extra_objects =