]> Pileus Git - ~andy/sunrise/blob - media-video/qnapi/qnapi-0.1.6_rc2.ebuild
sunrise/ app-portage/elog-list/elog-list-0.0.6.ebuild: Update headers for 2010
[~andy/sunrise] / media-video / qnapi / qnapi-0.1.6_rc2.ebuild
1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="2"
6 KDE_REQUIRED="optional"
7 CMAKE_REQUIRED="false"
8
9 inherit eutils gnome2-utils kde4-base qt4
10
11 MY_P=${P/_rc/-rc}
12
13 DESCRIPTION="Automatic subtitle downloader using Napiprojekt database"
14 HOMEPAGE="http://krzemin.iglu.cz/software/qnapi"
15 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
16
17 LICENSE="GPL-2"
18 SLOT="0"
19 KEYWORDS="~amd64 ~x86"
20 IUSE="gnome"
21
22 S=${WORKDIR}/${MY_P}
23
24 DEPEND="x11-libs/qt-core
25         x11-libs/qt-gui
26         gnome? ( gnome-base/gconf )"
27 RDEPEND="${DEPEND}
28         app-arch/p7zip"
29
30 # fix install paths, remove unneeded files, general cleanup
31 PATCHES=( "${FILESDIR}/${P}-gentoo.diff" )
32
33 pkg_setup() {
34         use kde && kde4-base_pkg_setup # get KDEDIR for KDE4
35         qt4_pkg_setup
36 }
37
38 src_configure() {
39         local integr
40
41         use gnome && integr="gnome_integration"
42         use kde && integr="${integr} kde4_integration"
43         KDE4DIR="${KDEDIR}" INTEGRATION_TARGETS="${integr}" eqmake4
44 }
45
46 src_compile() {
47         emake || die "emake failed."
48 }
49
50 src_install() {
51         emake INSTALL_ROOT="${D}" install || die "emake install failed."
52
53         prepalldocs || die "prepalldocs failed."
54 }
55
56 pkg_preinst() {
57         use gnome && gnome2_gconf_savelist
58 }
59
60 pkg_postinst() {
61         use gnome && gnome2_gconf_install
62         use kde && kde4-base_pkg_postinst
63 }
64
65 pkg_postrm() {
66         use kde && kde4-base_pkg_postrm
67 }