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.

77 lines
1.9 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.3.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. PYPI_NAME:=evdev
  15. PKG_HASH:=b1c649b4fed7252711011da235782b2c260b32e004058d62473471e5cd30634d
  16. include ../pypi.mk
  17. include $(INCLUDE_DIR)/package.mk
  18. include ../python-package.mk
  19. include ../python3-package.mk
  20. define Package/python-evdev/Default
  21. SUBMENU:=Python
  22. SECTION:=lang
  23. CATEGORY:=Languages
  24. URL:=https://github.com/gvalkov/python-evdev
  25. endef
  26. define Package/python-evdev
  27. $(call Package/python-evdev/Default)
  28. TITLE:=python-evdev
  29. DEPENDS:= \
  30. +PACKAGE_python-evdev:python-light \
  31. +PACKAGE_python-evdev:python-ctypes
  32. VARIANT:=python
  33. endef
  34. define Package/python3-evdev
  35. $(call Package/python-evdev/Default)
  36. TITLE:=python3-evdev
  37. DEPENDS:= \
  38. +PACKAGE_python3-evdev:python3-light \
  39. +PACKAGE_python3-evdev:python3-ctypes
  40. VARIANT:=python3
  41. endef
  42. define Package/python-evdev/description
  43. Bindings to the Linux input handling subsystem
  44. endef
  45. define Package/python3-evdev/description
  46. $(call Package/python-evdev/description)
  47. .
  48. (Variant for Python3)
  49. endef
  50. LINUX_EVDEV_HEADERS="$(LINUX_DIR)/include/uapi/linux/input.h:$(LINUX_DIR)/include/uapi/linux/input-event-codes.h"
  51. PYTHON3_PKG_SETUP_GLOBAL_ARGS:= \
  52. build build_ecodes \
  53. --evdev-headers="$(LINUX_EVDEV_HEADERS)" \
  54. build_ext
  55. PYTHON_PKG_SETUP_GLOBAL_ARGS:=$(PYTHON3_PKG_SETUP_GLOBAL_ARGS)
  56. $(eval $(call PyPackage,python-evdev))
  57. $(eval $(call BuildPackage,python-evdev))
  58. $(eval $(call BuildPackage,python-evdev-src))
  59. $(eval $(call Py3Package,python3-evdev))
  60. $(eval $(call BuildPackage,python3-evdev))
  61. $(eval $(call BuildPackage,python3-evdev-src))