roccat-tools-3.7.0.ebuild 2.1 KB

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