summaryrefslogtreecommitdiff
blob: a9734770960edd7789b6fc25f78871570379f60e (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-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-pda/multisync/multisync-0.80-r1.ebuild,v 1.12 2004/07/13 18:20:47 agriffis Exp $

inherit eutils

MY_P="${PF/r1/1}"
DESCRIPTION="Client to sync apps with WinCE or mobile devices"
HOMEPAGE="http://multisync.sourceforge.net/"
SRC_URI="mirror://sourceforge/multisync/${MY_P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86"
IUSE="evo gtk2 irmc ldap opie"
# evo   - evolution plugin
# irmc  - bluetooth/irmc/irda plugin ( local )
# opie  - opie plugin                ( local )
# ldap  - ldap plugin - experimental

DEPEND="virtual/libc
	>=gnome-base/libbonobo-2.2
	>=gnome-base/libgnome-2.2
	>=gnome-base/ORBit-0.5.17
	>=dev-libs/openssl-0.9.6j
	evo?  (
		gtk2? (
			=mail-client/evolution-1.4*
			=x11-libs/gtk+-2* )
		!gtk2? (
			=mail-client/evolution-1.2*
			=x11-libs/gtk+-1* )
	)
	irmc? ( >=sys-apps/irda-utils-0.9.15
		>=net-wireless/bluez-utils-2.3
		>=dev-libs/openobex-1.0.0 )
	opie? ( >=net-misc/curl-7.10.5 )
	ldap? ( >=net-nds/openldap-2.0.27 )"

S=${WORKDIR}/${PF/-r1/}

make_plugin_list() {
	export PLUGINS="backup_plugin syncml_plugin"
	use irmc && PLUGINS="${PLUGINS} irmc_sync"
	use evo && PLUGINS="${PLUGINS} evolution_sync"
	use opie && PLUGINS="${PLUGINS} opie_sync"
	use ldap && PLUGINS="${PLUGINS} ldap_plugin"
}

src_unpack() {
	unpack ${A}

	# Fix the opie Makefile
	cd ${S}
	epatch ${FILESDIR}/${PF}-gentoo.patch
}

src_compile() {
	make_plugin_list

	einfo "Building Multisync with these plugins:"
	for plugin_dir in ${PLUGINS}
	do
		einfo "      ${plugin_dir}"
	done

	cd ${S}
	econf || die
	make || die "Multisync make failed"

	cd ${S}/plugins
	for plugin_dir in ${PLUGINS}
	do
		cd ${S}/plugins/${plugin_dir}
		econf || die "${plugin_dir} config failed!"
		make || die "${plugin_dir} make failed!"
	done
}

src_install() {
	make_plugin_list
	einstall || die "Multisync install failed!"
	for plugin_dir in ${PLUGINS}
	do
		cd ${S}/plugins/${plugin_dir}
		einstall || die "${plugin_dir} make failed!"
	done
}