You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.6 KiB

  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=python-ldap
  9. PKG_VERSION:=3.1.0
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=Dmitry Trefilov <the-alien@live.ru>
  12. PKG_LICENSE:=Python-style
  13. PKG_LICENSE_FILES:=LICENSE
  14. PYPI_NAME:=$(PKG_NAME)
  15. PKG_HASH:=41975e79406502c092732c57ef0c2c2eb318d91e8e765f81f5d4ab6c1db727c5
  16. include ../pypi.mk
  17. include $(INCLUDE_DIR)/package.mk
  18. include ../python-package.mk
  19. define Package/python-ldap
  20. SUBMENU:=Python
  21. SECTION:=lang
  22. CATEGORY:=Languages
  23. DEPENDS:=+libopenldap +python
  24. TITLE:=Python modules for implementing LDAP clients
  25. URL:=https://python-ldap.org/
  26. endef
  27. define Package/python-ldap/description
  28. python-ldap provides an object-oriented API to access LDAP directory
  29. servers from Python programs. Mainly it wraps the OpenLDAP 2.x libs
  30. for that purpose. Additionally the package contains modules for
  31. other LDAP-related stuff (e.g. processing LDIF, LDAPURLs, LDAPv3
  32. schema, LDAPv3 extended operations and controls, etc.).
  33. endef
  34. define Build/Compile
  35. $(call Build/Compile/PyMod,,build_ext \
  36. --include-dirs="$(STAGING_DIR)/usr/include:$(STAGING_DIR)/usr/include/sasl" \
  37. --library-dirs="$(STAGING_DIR)/usr/lib:$(STAGING_DIR)/usr/lib/sasl2" \
  38. build_py \
  39. install --prefix="$(PKG_INSTALL_DIR)/usr")
  40. endef
  41. define PyPackage/python-ldap/install
  42. $(INSTALL_DIR) $(1)$(PYTHON_PKG_DIR)
  43. $(CP) \
  44. $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR)/* \
  45. $(1)$(PYTHON_PKG_DIR)
  46. endef
  47. $(eval $(call PyPackage,python-ldap))
  48. $(eval $(call BuildPackage,python-ldap))