dev-util/pkgcheck: version bump to 0.6.7
[gentoo.git] / sys-apps / roccat-tools / roccat-tools-5.7.0.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit readme.gentoo-r1 cmake-utils gnome2-utils udev user
7
8 DESCRIPTION="Utility for advanced configuration of Roccat devices"
9
10 HOMEPAGE="http://roccat.sourceforge.net/"
11 SRC_URI="mirror://sourceforge/roccat/${P}.tar.bz2"
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15
16 IUSE_INPUT_DEVICES=(
17         input_devices_roccat_arvo
18         input_devices_roccat_isku
19         input_devices_roccat_iskufx
20         input_devices_roccat_kiro
21         input_devices_roccat_kone
22         input_devices_roccat_koneplus
23         input_devices_roccat_konepure
24         input_devices_roccat_konepuremilitary
25         input_devices_roccat_konepureoptical
26         input_devices_roccat_konextd
27         input_devices_roccat_konextdoptical
28         input_devices_roccat_kovaplus
29         input_devices_roccat_kova2016
30         input_devices_roccat_lua
31         input_devices_roccat_nyth
32         input_devices_roccat_pyra
33         input_devices_roccat_ryosmk
34         input_devices_roccat_ryosmkfx
35         input_devices_roccat_ryostkl
36         input_devices_roccat_savu
37         input_devices_roccat_skeltr
38         input_devices_roccat_sova
39         input_devices_roccat_suora
40         input_devices_roccat_tyon
41 )
42
43 IUSE="${IUSE_INPUT_DEVICES[@]}"
44
45 RDEPEND="
46         dev-libs/dbus-glib
47         dev-libs/glib:2
48         >=dev-libs/libgaminggear-0.15.1
49         sys-apps/dbus
50         x11-libs/cairo
51         x11-libs/gtk+:2
52         x11-libs/libX11
53         virtual/libgudev:=
54         virtual/libusb:1
55         input_devices_roccat_ryosmk? ( || ( dev-lang/lua:5.1 dev-lang/lua:0 ) )
56         input_devices_roccat_ryosmkfx? ( || ( dev-lang/lua:5.1 dev-lang/lua:0 ) )
57         input_devices_roccat_ryostkl? ( || ( dev-lang/lua:5.1 dev-lang/lua:0 ) )
58 "
59
60 DEPEND="
61         ${RDEPEND}
62 "
63
64 DOCS=( Changelog KNOWN_LIMITATIONS README )
65
66 pkg_setup() {
67         enewgroup roccat
68
69         local model
70         for model in ${IUSE_INPUT_DEVICES[@]} ; do
71                 use ${model} && USED_MODELS+="${model/input_devices_roccat_/;}"
72         done
73 }
74
75 src_configure() {
76         mycmakeargs=(
77                 -DDEVICES="${USED_MODELS/;/}"
78                 -DUDEVDIR="$(get_udevdir)/rules.d"
79                 -DWITH_LUA=5.1
80         )
81         cmake-utils_src_configure
82 }
83
84 src_install() {
85         cmake-utils_src_install
86         local stat_dir=/var/lib/roccat
87         keepdir ${stat_dir}
88         fowners root:roccat ${stat_dir}
89         fperms 2770 ${stat_dir}
90         readme.gentoo_create_doc
91 }
92
93 pkg_preinst() {
94         gnome2_icon_savelist
95 }
96
97 pkg_postinst() {
98         gnome2_icon_cache_update
99         readme.gentoo_print_elog
100         ewarn
101         ewarn "This version breaks stored data for some devices. Before reporting bugs please delete"
102         ewarn "affected folder(s) in /var/lib/roccat"
103         ewarn
104 }
105
106 pkg_postrm() {
107         gnome2_icon_cache_update
108 }