]> Pileus Git - ~andy/sunrise/blob - net-misc/mugshot/mugshot-1.1.37.ebuild
media-video/ov51x-jpeg: Ebuild for bug 170508
[~andy/sunrise] / net-misc / mugshot / mugshot-1.1.37.ebuild
1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 WANT_AUTOCONF="latest"
6 WANT_AUTOMAKE="latest"
7
8 inherit autotools eutils gnome2 multilib
9
10 DESCRIPTION="Companion software for mugshot.org"
11 HOMEPAGE="http://www.mugshot.org/"
12 SRC_URI="http://download.mugshot.org/client/sources/linux/${P}.tar.gz"
13
14 LICENSE="GPL-2"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86"
17 IUSE="firefox"
18
19 RDEPEND=">=dev-libs/glib-2.6
20         >=x11-libs/gtk+-2.6
21         >=dev-libs/dbus-glib-0.71
22         >=dev-libs/libpcre-6.3
23         >=net-libs/loudmouth-1
24         >=gnome-base/gconf-2
25         >=net-misc/curl-7.13.1
26         firefox? ( >=www-client/mozilla-firefox-1.5 <www-client/mozilla-firefox-2.0.1 )
27         x11-libs/libXScrnSaver"
28
29 DEPEND="${RDEPEND}"
30
31 src_unpack() {
32         unpack ${A}
33         cd "${S}"
34         # configure looks in the wrong place for xpidl
35         sed -e 's:bin/xpidl:xpidl:' -i configure.ac
36         epatch "${FILESDIR}/${PN}-1.1.22-as-needed.patch"
37         epatch "${FILESDIR}/${PN}-1.1.32-libxpcom.patch"
38         epatch "${FILESDIR}/${PN}-1.1.32-use-firefox.patch"
39         eautoreconf
40         use firefox && sed -e "s:GET_LIBDIR:$(get_libdir):" \
41                 "${FILESDIR}/${PN}-1.1.26-firefox-update.sh" > "${S}/firefox-update.sh"
42 }
43
44 src_compile() {
45         econf $(use_enable firefox) \
46                 --with-gecko-sdk=/usr/$(get_libdir)/mozilla-firefox/ || die "./configure failed"
47         emake || die "emake failed"
48 }
49
50 pkg_postinst () {
51         gnome2_pkg_postinst
52
53         # install firefox extension
54         if use firefox ; then
55                 einfo "Installing firefox extension. "
56                 einfo "Please restart firefox in order to use the mugshot extension."
57                 "${S}/firefox-update.sh" install
58         fi
59 }
60
61 pkg_prerm () {
62         # remove firefox extension
63         if [ -x /usr/share/mugshot/firefox-update.sh ] ; then
64                 einfo "Removed the mugshot firefox extension."
65                 /usr/share/mugshot/firefox-update.sh remove
66         fi
67 }