]> Pileus Git - ~andy/sunrise/blob - gnome-extra/nautilus-dropbox/nautilus-dropbox-0.6.1-r1.ebuild
031ae17c49717a159a60cece9025c70f85f42113
[~andy/sunrise] / gnome-extra / nautilus-dropbox / nautilus-dropbox-0.6.1-r1.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
7 inherit eutils libtool linux-info python gnome2
8
9 DESCRIPTION="Store, Sync and Share Files Online"
10 HOMEPAGE="http://www.getdropbox.com/"
11 SRC_URI="http://www.getdropbox.com/download?dl=packages/${P}.tar.bz2"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE=""
17
18 RDEPEND="gnome-base/nautilus
19         dev-python/pygtk
20         dev-python/docutils
21         net-misc/wget
22         x11-libs/libnotify
23         x11-libs/libXinerama"
24
25 DEPEND="${RDEPEND}
26         dev-util/pkgconfig"
27
28 DOCS="AUTHORS ChangeLog NEWS README"
29
30 CONFIG_CHECK="INOTIFY_USER"
31
32 pkg_setup () {
33         linux-info_pkg_setup
34
35         # create the group for the daemon, if necessary
36         # truthfully this should be run for any dropbox plugin
37         enewgroup dropbox
38 }
39
40 src_configure () {
41         econf --disable-static
42 }
43
44 src_install () {
45         emake DESTDIR="${D}" install || die
46
47         local extensiondir="$(pkg-config --variable=extensiondir libnautilus-extension)"
48         [ -z ${extensiondir} ] && die "pkg-config unable to get nautilus extensions dir"
49
50         find "${D}" -name '*.la' -delete
51 }
52
53 pkg_postinst () {
54         gnome2_pkg_postinst
55
56         # Allow only for users in the dropbox group
57         # see http://forums.getdropbox.com/topic.php?id=3329&replies=5#post-22898
58         local extensiondir="$(pkg-config --variable=extensiondir libnautilus-extension)"
59         [ -z ${extensiondir} ] && die "pkg-config unable to get nautilus extensions dir"
60
61         chown root:dropbox "${ROOT}${extensiondir}"/lib${PN}.so || die "chown failed"
62         chmod o-rwx "${ROOT}${extensiondir}"/lib${PN}.so || die "chmod failed"
63
64         elog "Add any users who wish to have access to the dropbox nautilus"
65         elog "plugin to the group 'dropbox'."
66         elog
67         elog "If you've installed old version, Remove \${HOME}/.dropbox-dist first."
68         elog
69         elog " $ rm -rf \${HOME}/.dropbox-dist"
70         elog " $ dropbox start -i"
71 }