summaryrefslogtreecommitdiff
path: root/recipes/mozilla/firefox.inc
blob: 0c75e1002b70fe14e5021c9307260334655a702a (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
DESCRIPTION ?= "Browser made by mozilla"
DEPENDS += "alsa-lib curl"
SRC_URI += "file://mozilla-${PN}.png file://mozilla-${PN}.desktop"

ARM_INSTRUCTION_SET = "arm"

MOZPV ?= "${PV}"

PACKAGES =+ "${PN}-inspector"

PACKAGES += "${PN}-sdk"

FILES_${PN}-inspector = "	${libdir}/${PN}-${MOZPV}/chrome/inspector* \
				${libdir}/${PN}-${MOZPV}/components/*nspector* \
				${libdir}/${PN}-${MOZPV}/extensions/inspector* \
				${libdir}/${PN}-${MOZPV}/defaults/preferences/inspector* \
				"
FILES_${PN} = "${bindir}/${PN} \
               ${datadir}/applications/ \
	       ${datadir}/pixmaps/ \
	       ${libdir}/${PN}-${MOZPV}/* \
	       ${libdir}/${PN}-${MOZPV}/.autoreg \
	       ${bindir}/defaults"
FILES_${PN}-dev += "${datadir}/idl ${bindir}/${PN}-config"
FILES_${PN}-sdk += "${libdir}/${PN}-devel-${MOZPV}"
FILES_${PN}-dbg += "	${libdir}/${PN}-*/.debug \
			${libdir}/${PN}-*/*/.debug \
			${libdir}/${PN}-*/*/*/.debug \	
			${libdir}/${PN}-*/*/*/*/.debug \
			${bindir}/.debug \
			"

do_install() {
	oe_runmake DESTDIR="${D}" destdir="${D}" install
	install -d ${D}${datadir}/applications
	install -d ${D}${datadir}/pixmaps
	install -m 0644 ${WORKDIR}/mozilla-${PN}.desktop ${D}${datadir}/applications/
	install -m 0644 ${WORKDIR}/mozilla-${PN}.png ${D}${datadir}/pixmaps/
	rm -f ${D}${libdir}/${PN}-*/TestGtkEmbed
	rm -f ${D}${libdir}/${PN}-*/defaults/pref/firefox-l10n.js

	# use locale settings
	grep -Rl intl.locale.matchOS ${D}${libdir}/${PN}-*/ \
	   | grep '.js$' \
	   | xargs -n 1 sed -i 's/\(pref("intl.locale.matchOS",\s*\)false)/\1true)/g'

	# disable application updating
	grep -Rl app.update.enabled ${D}${libdir}/${PN}-*/ \
	   | grep '.js$' \
	   | xargs -n 1 sed -i 's/\(pref("app.update.enabled",\s*\)true)/\1false)/g'

        for pc in ${WORKDIR}/*.pc ; do
            sed -i s:3.5.2:${PV}:g $pc
        done

        install -d ${D}${libdir}/pkgconfig
        install -m 0644 ${WORKDIR}/firefox-plugin.pc ${D}${libdir}/pkgconfig
        install -m 0644 ${WORKDIR}/firefox-xpcom.pc ${D}${libdir}/pkgconfig
        install -m 0644 ${WORKDIR}/nspr.pc ${D}${libdir}/pkgconfig
}

pkg_postinst_${PN}() {
	# work around requirement for root access on first startup
	chmod -R a+w ${libdir}/${PN}* ||true 
}

# Force feed mozilla our ldflags
TARGET_CC_ARCH += " ${LDFLAGS} "

# We don't build XUL as system shared lib, so we can mark all libs as private
PRIVATE_LIBS = "libnssckbi.so \
                libxpcom.so \
                libplc4.so \
                libssl3.so \
                libfreebl3.so \
                libnss3.so \
                libnspr4.so \
                libmozjs.so \
                libxul.so \
                libplds4.so \
                libnssutil3.so \
                libsoftokn3.so \
                libnssdbm3.so \
                libsmime3.so \
                libnullplugin.so \
                libimgicon.so \
                libdbusservice.so \
                libbrowserdirprovider.so \
                libbrowsercomps.so \
                libnptest.so \
                libMyService.so \
                libmozgnome.so \
                libtestdynamic.so \
                libnkgnomevfs.so \
                libxpcomsample.so \
                libunixprintplugin.so \
"