]> Pileus Git - ~andy/sunrise/blob - net-mail/gmail-notify/gmail-notify-1.6.1.1.ebuild
6d5fd736c0434b3a74923e6ba4fe4e10c437b11f
[~andy/sunrise] / net-mail / gmail-notify / gmail-notify-1.6.1.1.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit python eutils
6
7 DESCRIPTION="A notification applet for Gmail that's alternative to the one released from Google"
8 HOMEPAGE="http://gmail-notify.sourceforge.net/"
9 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
10 LICENSE="GPL-2"
11
12 SLOT="0"
13 KEYWORDS="~amd64 ~x86"
14 IUSE=""
15
16 RDEPEND="dev-python/gnome-python-extras
17         >=dev-python/pygtk-2.0"
18 DEPEND=""
19
20 S=${WORKDIR}/${PN}
21
22 src_unpack() {
23         python_version
24         unpack ${A}
25         cd "${S}"
26         epatch  "${FILESDIR}/${PN}-conf-perms.patch" \
27                 "${FILESDIR}/${PN}-trayicon.patch" \
28                 "${FILESDIR}/${PN}-ubuntu-patches.patch"
29
30         # substitute the "GENTOO_PYVER" that was added by ${PN}-ubuntu-patches.patch
31         sed -i -e "s/GENTOO_PYVER/${PYVER}/g" *.py || die "Sed broke!"
32 }
33
34 src_install() {
35         python_version
36         local instdir=$(python_get_sitedir)/${PN}
37
38         dodoc README || die
39
40         insinto "${instdir}"
41         doins *.py *.jpg *.png langs.xml notifier.conf.sample || die
42
43         make_wrapper gmail-notify "${python} ${instdir}/notifier.py"
44 }
45
46 pkg_postinst() {
47         python_mod_optimize "$(python_get_sitedir)/${PN}"
48         einfo
49         einfo "Run gmail-notify to start the program"
50         einfo
51         ewarn "Warning: if you check the 'save username and password' option"
52         ewarn "your password will be stored in plaintext in ~/.notifier.conf"
53 }
54
55 pkg_postrm() {
56         python_mod_cleanup "$(python_get_sitedir)/${PN}"
57 }