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.

99 lines
2.6 KiB

  1. #
  2. # Copyright (C) 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-automat
  9. PKG_VERSION:=0.6.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=Automat-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/A/Automat
  13. PKG_HASH:=3c1fd04ecf08ac87b4dd3feae409542e9bf7827257097b2b6ed5692f69d6f6a8
  14. PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-automat-$(PKG_VERSION)
  15. PKG_LICENSE:=MIT
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_MAINTAINER:=Jeffery To <jeffery.to@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-automat/Default
  23. SECTION:=lang
  24. CATEGORY:=Languages
  25. SUBMENU:=Python
  26. URL:=https://github.com/glyph/Automat
  27. endef
  28. define Package/python-automat
  29. $(call Package/python-automat/Default)
  30. TITLE:=Concise, idiomatic finite-state automata
  31. DEPENDS:= \
  32. +PACKAGE_python-automat:python-light \
  33. +PACKAGE_python-automat:python-attrs \
  34. +PACKAGE_python-automat:python-six
  35. VARIANT:=python
  36. endef
  37. define Package/python3-automat
  38. $(call Package/python-automat/Default)
  39. TITLE:=Concise, idiomatic finite-state automata
  40. DEPENDS:= \
  41. +PACKAGE_python3-automat:python3-light \
  42. +PACKAGE_python3-automat:python3-attrs \
  43. +PACKAGE_python3-automat:python3-six
  44. VARIANT:=python3
  45. endef
  46. define Package/python-automat/description
  47. Automat is a library for concise, idiomatic Python expression of
  48. finite-state automata (particularly deterministic finite-state
  49. transducers).
  50. endef
  51. define Package/python3-automat/description
  52. $(call Package/python-automat/description)
  53. .
  54. (Variant for Python3)
  55. endef
  56. define PyPackage/python-automat/filespec
  57. +|$(PYTHON_PKG_DIR)
  58. -|$(PYTHON_PKG_DIR)/automat/_visualize.py
  59. endef
  60. define Py3Package/python3-automat/filespec
  61. +|$(PYTHON3_PKG_DIR)
  62. -|$(PYTHON3_PKG_DIR)/automat/_visualize.py
  63. endef
  64. define PyBuild/Compile
  65. $(call Build/Compile/PyMod,, \
  66. install --prefix="/usr" --root="$(PKG_INSTALL_DIR)", \
  67. PKG_VERSION="$(PKG_VERSION)" \
  68. )
  69. endef
  70. define Py3Build/Compile
  71. $(call Build/Compile/Py3Mod,, \
  72. install --prefix="/usr" --root="$(PKG_INSTALL_DIR)", \
  73. PKG_VERSION="$(PKG_VERSION)" \
  74. )
  75. endef
  76. $(eval $(call PyPackage,python-automat))
  77. $(eval $(call BuildPackage,python-automat))
  78. $(eval $(call BuildPackage,python-automat-src))
  79. $(eval $(call Py3Package,python3-automat))
  80. $(eval $(call BuildPackage,python3-automat))
  81. $(eval $(call BuildPackage,python3-automat-src))