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.

71 lines
1.8 KiB

  1. #
  2. # Copyright (C) 2015-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-cffi
  9. PKG_VERSION:=1.12.3
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=cffi-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/c/cffi
  13. PKG_HASH:=041c81822e9f84b1d9c401182e174996f0bae9991f33725d059b771744290774
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-cffi-$(PKG_VERSION)
  15. PKG_LICENSE:=MIT
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_MAINTAINER:=Jeffery To <jeffery.to@gmail.com>, Alexandru Ardelean <ardeleanalex@gmail.com>
  18. include $(INCLUDE_DIR)/package.mk
  19. include ../python-package.mk
  20. include ../python3-package.mk
  21. PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  22. define Package/python-cffi/Default
  23. SECTION:=lang
  24. CATEGORY:=Languages
  25. SUBMENU:=Python
  26. TITLE:=C Foreign Function Interface
  27. URL:=https://cffi.readthedocs.org/
  28. DEPENDS:=+libffi
  29. endef
  30. define Package/python-cffi
  31. $(call Package/python-cffi/Default)
  32. DEPENDS+= \
  33. +PACKAGE_python-cffi:python-light \
  34. +PACKAGE_python-cffi:python-pycparser
  35. VARIANT:=python
  36. endef
  37. define Package/python3-cffi
  38. $(call Package/python-cffi/Default)
  39. DEPENDS+= \
  40. +PACKAGE_python3-cffi:python3-light \
  41. +PACKAGE_python3-cffi:python3-pycparser
  42. VARIANT:=python3
  43. endef
  44. define Package/python-cffi/description
  45. Foreign Function Interface for Python calling C code.
  46. endef
  47. define Package/python3-cffi/description
  48. $(call Package/python-cffi/description)
  49. .
  50. (Variant for Python3)
  51. endef
  52. $(eval $(call PyPackage,python-cffi))
  53. $(eval $(call BuildPackage,python-cffi))
  54. $(eval $(call BuildPackage,python-cffi-src))
  55. $(eval $(call Py3Package,python3-cffi))
  56. $(eval $(call BuildPackage,python3-cffi))
  57. $(eval $(call BuildPackage,python3-cffi-src))