app-crypt/xul-ext-monkeysphere: update manifest
[portage-overlay.git] / app-crypt / xul-ext-monkeysphere / xul-ext-monkeysphere-0.8.ebuild
1 EAPI=5
2
3 inherit eutils
4
5 DESCRIPTION="Iceweasel/Firefox extension for using Monkeysphere on the web"
6 HOMEPAGE="http://web.monkeysphere.info/"
7
8 SRC_URI="http://archive.monkeysphere.info/debian/pool/monkeysphere/x/xul-ext-monkeysphere/xul-ext-monkeysphere_${PV}.orig.tar.gz"
9
10 LICENSE="GPL-3"
11 SLOT="0"
12 KEYWORDS="~amd64 ~x86"
13 IUSE=""
14
15 RDEPEND="app-crypt/msva-perl"
16 DEPEND="
17         || ( www-client/firefox-bin www-client/firefox ) 
18         app-arch/unzip
19         media-gfx/inkscape"
20
21 src_install(){
22         local emid=$(sed -n 's/.*<em:id>\(.*\)<\/em:id>.*/\1/p' ${S}/install.rdf | head -1)
23         local cleanup="NOTES Makefile install.rdf.template monkeysphere.xpi chrome/content/*.svg"
24         local edir=""
25         for i in $cleanup; do rm ${S}/$i; done;
26         local extinstalldir=""
27
28         if has_version '>=www-client/firefox-bin-1.0'; then
29                 einfo "Binary version of Firefox found"
30                 extinstalldir="${D}/opt/firefox/extensions/${emid}  $extinstalldir"
31         fi
32
33         if has_version '>=www-client/firefox-1.0'; then
34                 einfo "Source version of Firefox found"
35                 extinstalldir="${D}/usr/lib/firefox/browser/extensions/${emid}  $extinstalldir"
36         fi
37
38         
39         for i in $extinstalldir; do
40                 mkdir -p "${i}" || die
41                 cp -r ${S}/* "${i}" || die
42         done;
43 }