summaryrefslogtreecommitdiff
blob: 2936a05fe6ff42cc8d124b17af5949797e3189b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="4"
KDE_REQUIRED="optional"
CMAKE_REQUIRED="false"

inherit eutils gnome2-utils kde4-base qt4-r2

MY_P=${P/_rc/-rc}

DESCRIPTION="Automatic subtitle downloader using Napiprojekt database"
HOMEPAGE="http://krzemin.iglu.cz/software/qnapi"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="gnome"

S=${WORKDIR}/${MY_P}

DEPEND="dev-libs/qtcore:4
	dev-libs/qtgui:4
	gnome? ( gnome-base/gconf )"
RDEPEND="${DEPEND}
	app-arch/p7zip"

# fix install paths, remove unneeded files, general cleanup
PATCHES=( "${FILESDIR}/${P}-gentoo.diff" )

pkg_setup() {
	use kde && kde4-base_pkg_setup # get KDEDIR for KDE4
}

src_configure() {
	local integr

	use gnome && integr="gnome_integration"
	use kde && integr="${integr} kde4_integration"
	KDE4DIR="${KDEDIR}" INTEGRATION_TARGETS="${integr}" eqmake4
}

pkg_preinst() {
	use gnome && gnome2_gconf_savelist
}

pkg_postinst() {
	use gnome && gnome2_gconf_install
	use kde && kde4-base_pkg_postinst
}

pkg_postrm() {
	use kde && kde4-base_pkg_postrm
}