Merge pull request #4853 from StevenHessing/noddos
[feed/packages.git] / lang / python / python-ldap / Makefile
1 #
2 # Copyright (C) 2016-2017 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.32
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/67/d9/fa0ea70d1792875745116ad62ac8d4bcb07550b15cded591bb57df6a6d9a
19 PKG_HASH:=5810f1b5a9ae9255df99fb9c2dcab7352fed325687efda56c0faae1a82c5e3cb
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))