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.

81 lines
2.1 KiB

  1. #
  2. # Copyright (C) 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. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=python-evdev
  10. PKG_VERSION:=1.2.0
  11. PKG_RELEASE:=1
  12. PKG_LICENSE:=BSD-3-Clause
  13. PKG_MAINTAINER:=Paulo Costa <me@paulo.costa.nom.br>, Alexandru Ardelean <ardeleanalex@gmail.com>
  14. PKG_SOURCE:=evdev-$(PKG_VERSION).tar.gz
  15. PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/e/evdev
  16. PKG_HASH:=b03f5e1be5b4a5327494a981b831d251a142b09e8778eda1a8b53eba91100166
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-evdev-$(PKG_VERSION)
  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-evdev/Default
  23. SUBMENU:=Python
  24. SECTION:=lang
  25. CATEGORY:=Languages
  26. URL:=https://github.com/gvalkov/python-evdev
  27. endef
  28. define Package/python-evdev
  29. $(call Package/python-evdev/Default)
  30. TITLE:=python-evdev
  31. DEPENDS:= \
  32. +PACKAGE_python-evdev:python-light \
  33. +PACKAGE_python-evdev:python-ctypes
  34. VARIANT:=python
  35. endef
  36. define Package/python3-evdev
  37. $(call Package/python-evdev/Default)
  38. TITLE:=python3-evdev
  39. DEPENDS:= \
  40. +PACKAGE_python3-evdev:python3-light \
  41. +PACKAGE_python3-evdev:python3-ctypes
  42. VARIANT:=python3
  43. endef
  44. define Package/python-evdev/description
  45. Bindings to the Linux input handling subsystem
  46. endef
  47. define Package/python3-evdev/description
  48. $(call Package/python-evdev/description)
  49. .
  50. (Variant for Python3)
  51. endef
  52. LINUX_EVDEV_HEADERS="$(LINUX_DIR)/include/uapi/linux/input.h:$(LINUX_DIR)/include/uapi/linux/input-event-codes.h"
  53. PYTHON3_PKG_SETUP_GLOBAL_ARGS:= \
  54. build build_ecodes \
  55. --evdev-headers="$(LINUX_EVDEV_HEADERS)" \
  56. build_ext
  57. PYTHON_PKG_SETUP_GLOBAL_ARGS:=$(PYTHON3_PKG_SETUP_GLOBAL_ARGS)
  58. $(eval $(call PyPackage,python-evdev))
  59. $(eval $(call BuildPackage,python-evdev))
  60. $(eval $(call BuildPackage,python-evdev-src))
  61. $(eval $(call Py3Package,python3-evdev))
  62. $(eval $(call BuildPackage,python3-evdev))
  63. $(eval $(call BuildPackage,python3-evdev-src))