roccat-tools-5.1.1.ebuild 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit readme.gentoo cmake-utils gnome2-utils udev user
  5. DESCRIPTION="Utility for advanced configuration of Roccat devices"
  6. HOMEPAGE="http://roccat.sourceforge.net/"
  7. SRC_URI="mirror://sourceforge/roccat/${P}.tar.bz2"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE_INPUT_DEVICES="
  12. input_devices_roccat_arvo
  13. input_devices_roccat_isku
  14. input_devices_roccat_iskufx
  15. input_devices_roccat_kiro
  16. input_devices_roccat_kone
  17. input_devices_roccat_koneplus
  18. input_devices_roccat_konepure
  19. input_devices_roccat_konepuremilitary
  20. input_devices_roccat_konepureoptical
  21. input_devices_roccat_konextd
  22. input_devices_roccat_konextdoptical
  23. input_devices_roccat_kovaplus
  24. input_devices_roccat_kova2016
  25. input_devices_roccat_lua
  26. input_devices_roccat_nyth
  27. input_devices_roccat_pyra
  28. input_devices_roccat_ryosmk
  29. input_devices_roccat_ryostkl
  30. input_devices_roccat_savu
  31. input_devices_roccat_tyon
  32. "
  33. IUSE="${IUSE_INPUT_DEVICES}"
  34. RDEPEND="
  35. =dev-libs/libgaminggear-0.13*
  36. x11-libs/gtk+:2
  37. x11-libs/libnotify
  38. media-libs/libcanberra
  39. virtual/libusb:1
  40. dev-libs/dbus-glib
  41. virtual/libgudev:=
  42. || ( dev-lang/lua:5.1 dev-lang/lua:0 )
  43. "
  44. DEPEND="${RDEPEND}"
  45. pkg_setup() {
  46. enewgroup roccat
  47. }
  48. src_configure() {
  49. local UDEVDIR="$(get_udevdir)"/rules.d
  50. local MODELS=${INPUT_DEVICES//roccat_/}
  51. mycmakeargs=(
  52. -DDEVICES=${MODELS// /;} \
  53. -DUDEVDIR="${UDEVDIR/"//"//}"
  54. -DWITH_LUA=5.1
  55. )
  56. cmake-utils_src_configure
  57. }
  58. src_install() {
  59. cmake-utils_src_install
  60. local stat_dir=/var/lib/roccat
  61. keepdir $stat_dir
  62. fowners root:roccat $stat_dir
  63. fperms 2770 $stat_dir
  64. readme.gentoo_src_install
  65. }
  66. pkg_preinst() {
  67. gnome2_icon_savelist
  68. }
  69. pkg_postinst() {
  70. gnome2_icon_cache_update
  71. readme.gentoo_print_elog
  72. ewarn
  73. ewarn "This version breaks stored data for some devices. Before reporting bugs please delete"
  74. ewarn "affected folder(s) in /var/lib/roccat"
  75. ewarn
  76. }
  77. pkg_postrm() {
  78. gnome2_icon_cache_update
  79. }