summaryrefslogtreecommitdiff
blob: 3a68168a9c18cf3b897a27d1a10582c0f5956586 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI="2"

inherit eutils

DESCRIPTION="A simple backup system inspired by TimeVault and FlyBack, with a GUI for GNOME and KDE4"
HOMEPAGE="http://backintime.le-web.org/"
SRC_URI="http://backintime.le-web.org/download/backintime/${P}_src.tar.gz"

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

DEPEND="dev-lang/python
	net-misc/rsync[xattr,acl]
	kde? (
		>=kde-base/kdelibs-4
		kde-base/pykde4
		kde-base/kompare
		kde-base/kdesu
		)
	gnome? (
		gnome-base/libglade
		gnome-base/gnome-session
		dev-python/gnome-vfs-python
		dev-python/gnome-python
		)
	dev-python/notify-python
	"

RDEPEND="${DEPEND}"

src_prepare() {
	#fix doc install location
	sed -i "s:/doc/kde4/HTML/:/doc/HTML/:g" kde4/Makefile.template
	sed -i "s:/doc/backintime:/doc/${PF}:g" common/Makefile.template
}

src_configure() {
	cd "${S}"/common
	econf

	if use kde ; then
		cd "${S}"/kde4
		econf
	fi

	if use gnome ; then
		cd "${S}"/gnome
		econf
	fi
}

src_compile() {
	cd "${S}"/common
	emake

	if use kde ; then
		cd "${S}"/kde4
		emake
	fi

	if use gnome ; then
		cd "${S}"/gnome
		emake
	fi
}

src_install() {
	cd "${S}"/common
	emake DESTDIR="${D}" install || die

	if use kde ; then
		cd "${S}"/kde4
		emake DESTDIR="${D}" install || die
		#use kdesu instead of kdesudo
		sed -i 's/kdesudo/kdesu/' \
			"${D}"//usr/share/applications/kde4/backintime-kde4-root.desktop
	fi

	if use gnome ; then
		cd "${S}"/gnome
		emake DESTDIR="${D}" install || die
	fi
}