roccat-tools-3.9.0.ebuild 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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} lua"
  34. REQUIRED_USE="
  35. lua? ( input_devices_roccat_ryosmk )
  36. "
  37. RDEPEND="
  38. =dev-libs/libgaminggear-0.11*
  39. x11-libs/gtk+:2
  40. x11-libs/libnotify
  41. media-libs/libcanberra
  42. virtual/libusb:1
  43. dev-libs/dbus-glib
  44. virtual/libgudev:=
  45. lua? ( || ( dev-lang/lua:5.1 dev-lang/lua:0 ) )
  46. "
  47. DEPEND="${RDEPEND}"
  48. pkg_setup() {
  49. enewgroup roccat
  50. }
  51. src_configure() {
  52. local UDEVDIR="$(get_udevdir)"/rules.d
  53. local MODELS=${INPUT_DEVICES//roccat_/}
  54. mycmakeargs=(
  55. -DDEVICES=${MODELS// /;} \
  56. -DUDEVDIR="${UDEVDIR/"//"//}"
  57. )
  58. if use lua ; then
  59. mycmakeargs+=( -DWITH_LUA=5.1 )
  60. fi
  61. cmake-utils_src_configure
  62. }
  63. src_install() {
  64. cmake-utils_src_install
  65. local stat_dir=/var/lib/roccat
  66. keepdir $stat_dir
  67. fowners root:roccat $stat_dir
  68. fperms 2770 $stat_dir
  69. readme.gentoo_src_install
  70. }
  71. pkg_preinst() {
  72. gnome2_icon_savelist
  73. }
  74. pkg_postinst() {
  75. gnome2_icon_cache_update
  76. readme.gentoo_print_elog
  77. ewarn
  78. ewarn "Starting from version 3.0.0, executables were renamed and now prefixed with 'roccat',"
  79. ewarn "so konextdconfig is now roccatkonextdconfig and so on"
  80. ewarn "Everything that was ryos is now ryosmk to distinguish it from the ryostkl product range"
  81. ewarn
  82. }
  83. pkg_postrm() {
  84. gnome2_icon_cache_update
  85. }