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.

65 lines
1.8 KiB

  1. #
  2. # Copyright (C) 2007-2018 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-mysql
  9. PKG_VERSION:=1.3.14
  10. PKG_RELEASE:=2
  11. PKG_LICENSE:=GPL-2.0
  12. PKG_SOURCE:=mysqlclient-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/m/mysqlclient
  14. PKG_HASH:=3981ae9ce545901a36a8b7aed76ed02960a429f75dc53b7ad77fb2f9ab7cd56b
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-mysql-$(PKG_VERSION)
  16. PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
  17. include $(INCLUDE_DIR)/package.mk
  18. include ../python-package.mk
  19. include ../python3-package.mk
  20. # python-mysql needs iconv
  21. include $(INCLUDE_DIR)/nls.mk
  22. PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  23. define Package/python-mysql/Default
  24. SUBMENU:=Python
  25. SECTION:=lang
  26. CATEGORY:=Languages
  27. URL:=https://pypi.python.org/project/mysqlclient
  28. endef
  29. define Package/python-mysql
  30. $(call Package/python-mysql/Default)
  31. TITLE:=MySQL database adapter for Python
  32. DEPENDS:=+PACKAGE_python-mysql:python +libmysqlclient
  33. VARIANT:=python
  34. endef
  35. define Package/python3-mysql
  36. $(call Package/python-mysql/Default)
  37. TITLE:=MySQL database adapter for Python3
  38. DEPENDS:=+PACKAGE_python3-mysql:python3 +libmysqlclient
  39. VARIANT:=python3
  40. endef
  41. define Package/python-mysql/description
  42. MySQLdb is an thread-compatible interface to the popular MySQL database
  43. server that provides the Python database API.
  44. endef
  45. define Package/python3-mysql/description
  46. $(call Package/python-mysql/description)
  47. .
  48. (Variant for Python3)
  49. endef
  50. $(eval $(call PyPackage,python-mysql))
  51. $(eval $(call BuildPackage,python-mysql))
  52. $(eval $(call Py3Package,python3-mysql))
  53. $(eval $(call BuildPackage,python3-mysql))