8a8c7b02163445ebb219327bb37b54cb0e442e3a
[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         media-gfx/inkscape"
19
20 src_install(){
21         local emid=$(sed -n 's/.*<em:id>\(.*\)<\/em:id>.*/\1/p' ${S}/install.rdf | head -1)
22         local cleanup="NOTES Makefile install.rdf.template monkeysphere.xpi chrome/content/*.svg"
23         local edir=""
24         for i in $cleanup; do rm ${S}/$i; done;
25         local extinstalldir=""
26
27         if has_version '>=www-client/firefox-bin-1.0'; then
28                 einfo "Binary version of Firefox found"
29                 extinstalldir="${D}/opt/firefox/extensions/${emid}  $extinstalldir"
30         fi
31
32         if has_version '>=www-client/firefox-1.0'; then
33                 einfo "Source version of Firefox found"
34                 extinstalldir="${D}/usr/lib/firefox/browser/extensions/${emid}  $extinstalldir"
35         fi
36
37         
38         for i in $extinstalldir; do
39                 mkdir -p "${i}" || die
40                 cp -r ${S}/* "${i}" || die
41         done;
42 }