piper-0.4.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Copyright 1999-2019 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. PYTHON_COMPAT=( python3_{6,7,8,9} )
  5. inherit desktop meson udev python-any-r1 gnome2-utils
  6. DESCRIPTION="GUI Software to configure gaming mice"
  7. HOMEPAGE="https://github.com/libratbag/piper"
  8. SRC_URI="https://github.com/libratbag/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
  9. LICENSE="MIT"
  10. SLOT="0"
  11. KEYWORDS="amd64 x86"
  12. IUSE="test"
  13. RESTRICT="!test? ( test )"
  14. #REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  15. DEPEND="${PYTHON_DEPS}
  16. virtual/pkgconfig
  17. "
  18. RDEPEND="
  19. dev-libs/libevdev
  20. dev-python/python-evdev
  21. virtual/libudev
  22. "
  23. src_prepare() {
  24. default
  25. # sed '/default:/d' -i meson_options.txt || die
  26. python_fix_shebang .
  27. }
  28. pkg_setup() {
  29. python-any-r1_pkg_setup
  30. }
  31. src_configure() {
  32. #python_setup 'python3'
  33. local emesonargs=(
  34. -Dtests=$(usex test true false)
  35. )
  36. meson_src_configure
  37. }
  38. src_install(){
  39. default
  40. meson_src_install
  41. python_optimize "${ED}/usr/share/${PN}"
  42. python_optimize "${ED}"
  43. python_optimize
  44. }
  45. pkg_postinst() {
  46. xdg_desktop_database_update
  47. gnome2_icon_cache_update
  48. }
  49. pkg_postrm() {
  50. xdg_desktop_database_update
  51. gnome2_icon_cache_update
  52. }