summaryrefslogtreecommitdiff
path: root/recipes/mozilla/firefox-addon.inc
blob: fa0eca6d480e7821c0f82d69cf829cbeb559e8b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Copyright (C) 2009, O.S. Systems Software Ltda. All Rights Reserved
# Released under the MIT license (see packages/COPYING)

DEPENDS = "unzip-native"
RDEPENDS = "firefox"

S = "${WORKDIR}"
FIREFOX_VERSION = "3.0.4"

do_configure() {
	unzip -o -q -d xpi *.xpi
}

INC_PR = "r1"

do_install() {
	cd ${S}/xpi

	if [ -z ${EXTENSION} ]; then
	   echo "You NEED to define EXTENSION in your recipe. Exiting"
	   exit 1
	fi

	mkdir -p ${D}/usr/lib/firefox-${FIREFOX_VERSION}/extensions/${EXTENSION}/chrome
	mkdir -p ${D}/usr/lib/firefox-${FIREFOX_VERSION}/extensions/${EXTENSION}/uninstall
	install -m 644 chrome/*.jar ${D}/usr/lib/firefox-${FIREFOX_VERSION}/extensions/${EXTENSION}/chrome
	install -m 644 install.rdf ${D}/usr/lib/firefox-${FIREFOX_VERSION}/extensions/${EXTENSION}
	install -m 644 chrome.manifest ${D}/usr/lib/firefox-${FIREFOX_VERSION}/extensions/${EXTENSION}

	cat install.rdf > ${D}/usr/lib/firefox-${FIREFOX_VERSION}/extensions/${EXTENSION}/uninstall/Uninstall
}

FILES_${PN} += "/usr/lib/firefox-${FIREFOX_VERSION}"
PACKAGE_ARCH = "all"