]> Pileus Git - ~andy/sunrise/blob - media-sound/asoundconf/asoundconf-1.0.14.ebuild
dev-perl/perl-xyne-common: Drop dev-perl/perl-xyne-common abandoned/replaced by upstream.
[~andy/sunrise] / media-sound / asoundconf / asoundconf-1.0.14.ebuild
1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 PYTHON_DEPEND="2"
6
7 inherit python
8
9 DESCRIPTION="Utilities to change your default sound card in ALSA."
10 HOMEPAGE="https://code.launchpad.net/asoundconf-ui"
11
12 MY_P="alsa-utils_${PV}-1ubuntu4_i386"
13 GTK_PN="${PN}-gtk"
14 GTK_PV="1.5.1"
15 GTK_MY_P="${PN}-gtk_${GTK_PV}-0ubuntu2_all"
16 SRC_URI="mirror://ubuntu/pool/main/a/alsa-utils/${MY_P}.deb
17          gtk? ( mirror://ubuntu/pool/universe/a/${GTK_PN}/${GTK_MY_P}.deb )"
18
19 LICENSE="GPL-2"
20 SLOT="0"
21 KEYWORDS="~x86"
22 IUSE="gtk"
23
24 RDEPEND="
25         >=media-sound/alsa-utils-1.0.14
26         gtk? ( dev-python/pygtk
27                 x11-themes/gnome-icon-theme )" # needed for .desktop file
28
29 S="${WORKDIR}"
30
31 pkg_setup() {
32         python_set_active_version 2
33 }
34
35 src_unpack() {
36         unpack ${MY_P}.deb
37         unpack ./data.tar.gz
38         rm -f "${WORKDIR}"/{{control,data}.tar.gz,debian-binary}
39         if use gtk ; then
40                 mkdir gtk
41                 pushd gtk
42                 unpack ${GTK_MY_P}.deb
43                 unpack ./data.tar.gz
44                 rm -f "${WORKDIR}"/gtk/{{control,data}.tar.gz,debian-binary}
45                 popd
46         fi
47         python_convert_shebangs -r 2 .
48 }
49
50 src_install() {
51         dobin usr/bin/asoundconf
52         doman usr/share/man/man1/asoundconf.1.gz
53
54         if use gtk ; then
55                 cd gtk
56                 dobin usr/bin/asoundconf-gtk
57                 doman usr/share/man/man8/asoundconf-gtk.8.gz
58                 dodoc usr/share/doc/${GTK_PN}/README
59                 domenu usr/share/applications/asoundconf-gtk.desktop
60         fi
61 }