7f46c769f5c1096f618915418ac1af783359d0d1
[portage-overlay.git] / app-crypt / xul-ext-monkeysphere / xul-ext-monkeysphere-9999.ebuild
1 EAPI=5
2
3 inherit base eutils
4
5 DESCRIPTION="Iceweasel/Firefox extension for using Monkeysphere on the web"
6 HOMEPAGE="http://web.monkeysphere.info/"
7
8 if [[ ${PV} == "9999" ]] ; then
9     inherit git-2
10     EGIT_BRANCH="master"
11     EGIT_REPO_URI="git://git.monkeysphere.info/${PN}"
12     SRC_URI=""
13 else
14     MY_P="${PN}_${PV}"
15     SRC_URI="http://archive.monkeysphere.info/debian/pool/monkeysphere/m/${PN}/${MY_P}.orig.tar.gz"
16 fi
17
18
19 LICENSE="GPL-3"
20 SLOT="0"
21 KEYWORDS="~amd64 ~x86"
22 IUSE=""
23
24 RDEPEND="app-crypt/msva-perl"
25 DEPEND="dev-vcs/git"
26 S="${WORKDIR}"
27
28 src_prepare() {
29         unpack monkeysphere.xpi
30 }
31
32 src_compile() {
33         pushd libufe-xidgetter/
34                 emake || die
35         popd
36
37         pushd unity-firefox-extension/
38                 bash ./build.sh || die
39         popd
40 }
41
42 src_install() {
43         pushd libufe-xidgetter/
44                 emake DESTDIR="${D}" install
45         popd
46
47         pushd unity-firefox-extension/
48                 local emid=$(sed -n 's/.*<em:id>\(.*\)<\/em:id>.*/\1/p' install.rdf | head -1)
49                 dodir usr/lib/firefox/browser/extensions/${emid}/
50                 unzip unity.xpi -d \
51                         "${D}usr/lib/firefox/browser/extensions/${emid}/" || die
52         popd
53         dosym /usr/lib/firefox/browser/extensions/${emid} /opt/firefox/browser/extensions/${emid}
54
55         prune_libtool_files --modules
56 }