APKBUILD 5.35 KB
Newer Older
Ariadne Conill's avatar
Ariadne Conill committed
1
# Contributor: William Pitcock <nenolod@dereferenced.org>
2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
Ariadne Conill's avatar
Ariadne Conill committed
3
pkgname=firefox
Natanael Copa's avatar
Natanael Copa committed
4
pkgver=24.0
Natanael Copa's avatar
Natanael Copa committed
5
_pkgver=$pkgver
Natanael Copa's avatar
Natanael Copa committed
6
_xulver=$pkgver
Natanael Copa's avatar
Natanael Copa committed
7
pkgrel=0
Ariadne Conill's avatar
Ariadne Conill committed
8
pkgdesc="firefox web browser"
Ariadne Conill's avatar
Ariadne Conill committed
9 10 11
url="http://www.firefox.com"
arch="all"
license="GPL LGPL MPL"
12
depends="xulrunner>=${_xulver}"
Ariadne Conill's avatar
Ariadne Conill committed
13 14
makedepends="xulrunner-dev>=${_xulver}

15 16 17
	     nspr-dev
	     nss-dev
	     gtk+-dev
Ariadne Conill's avatar
Ariadne Conill committed
18
             mesa-dev
19 20 21 22 23 24 25 26
             dbus-glib-dev
             alsa-lib-dev
             libvorbis-dev
             libogg-dev
             libtheora-dev
             wireless-tools-dev
             libnotify-dev
             libevent-dev
Natanael Copa's avatar
Natanael Copa committed
27
	     libvpx-dev
28
             libxt-dev
29
             libjpeg-turbo-dev
30 31 32 33 34
             bzip2-dev
             hunspell-dev
             startup-notification-dev
             sqlite-dev
             libidl-dev
35 36
             gstreamer-dev
             gst-plugins-base-dev
37

Ariadne Conill's avatar
Ariadne Conill committed
38 39 40 41
	     autoconf2.13

	     python
	     zip
42
	     yasm
Ariadne Conill's avatar
Ariadne Conill committed
43 44 45

	     autoconf
	     automake
46 47 48
	     libtool

	     paxctl"
Ariadne Conill's avatar
Ariadne Conill committed
49
install=""
50
subpackages="$pkgname-pdfjs"
51
source="ftp://ftp.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.bz2
Ariadne Conill's avatar
Ariadne Conill committed
52
	mozconfig
Natanael Copa's avatar
Natanael Copa committed
53
	firefox-5.0-asciidel.patch
54
	duckduckgo.patch
55
	vendor.js
56 57
	firefox.desktop
	firefox-safe.desktop"
Ariadne Conill's avatar
Ariadne Conill committed
58

59 60
options="!strip"

Ariadne Conill's avatar
Ariadne Conill committed
61
_builddir="${srcdir}/mozilla-release"
Natanael Copa's avatar
Natanael Copa committed
62 63
_mozappdir=/usr/lib/firefox-$pkgver

Ariadne Conill's avatar
Ariadne Conill committed
64 65 66 67 68 69 70 71 72 73 74 75
prepare() {
	local i

	cd "$_builddir"

	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done

	cp "${srcdir}/mozconfig" .mozconfig
Natanael Copa's avatar
Natanael Copa committed
76
	echo "ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul)" >> .mozconfig
77 78
	echo "ac_add_options --enable-debug-symbols" >> .mozconfig
	echo "ac_add_options --disable-install-strip" >>.mozconfig
Ariadne Conill's avatar
Ariadne Conill committed
79 80 81 82 83
}

build() {
	cd "$_builddir"

Natanael Copa's avatar
Natanael Copa committed
84 85 86
	# mozilla's buildsystem is on drugs
	export CFLAGS="$(echo $CFLAGS | sed -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g')"
	export CXXFLAGS="$CFLAGS"
Ariadne Conill's avatar
Ariadne Conill committed
87

Natanael Copa's avatar
Natanael Copa committed
88 89 90 91
#	export LDFLAGS="-Wl,-rpath,${_mozappdir}"
	make -j1 -f client.mk build \
		STRIP="/bin/true" \
		MOZ_MAKE_FLAGS="$MAKEOPTS" || return 1
Ariadne Conill's avatar
Ariadne Conill committed
92 93 94 95
}

package() {
	cd "$_builddir"
96 97 98 99
	make -j1 -f client.mk install \
		DESTDIR="$pkgdir" \
		MOZ_MAKE_FLAGS="$MAKEOPTS" \
		|| return 1
100 101 102

	install -m755 -d ${pkgdir}/usr/share/applications
	install -m755 -d ${pkgdir}/usr/share/pixmaps
Natanael Copa's avatar
Natanael Copa committed
103 104
	install -m644 "$_builddir"/browser/branding/official/default48.png \
		${pkgdir}/usr/share/pixmaps/firefox.png || return 1
105 106
	install -m644 ${srcdir}/firefox.desktop ${pkgdir}/usr/share/applications/firefox.desktop
	install -m644 ${srcdir}/firefox-safe.desktop ${pkgdir}/usr/share/applications/firefox-safe.desktop
107 108

	# firefox currently does not work with mprotect. disable it for now
Natanael Copa's avatar
Natanael Copa committed
109 110 111 112 113 114 115 116 117 118
	paxctl -c -m "$pkgdir"/$_mozappdir/firefox || return 1

	# xulrunner stub launcher has changed to using a symlink overlay...
	# go figure
	ln -sf /usr/lib/xulrunner-${_xulver} ${pkgdir}/$_mozappdir/xulrunner

	# launcher as symlink is broken from firefox-7.0
	rm "$pkgdir"/usr/bin/firefox || return 1
	cat > "$pkgdir"/usr/bin/firefox << __EOF__
#!/bin/sh
Ariadne Conill's avatar
Ariadne Conill committed
119

Natanael Copa's avatar
Natanael Copa committed
120 121 122
exec $_mozappdir/firefox "\$@"
__EOF__
	chmod 755 "$pkgdir"/usr/bin/firefox
123 124

	# install our vendor prefs
Natanael Copa's avatar
Natanael Copa committed
125
	cat "$srcdir"/vendor.js >> "$pkgdir"/$_mozappdir/browser/defaults/preferences/firefox-branding.js
Ariadne Conill's avatar
Ariadne Conill committed
126 127
}

128 129
pdfjs() {
	pkgdesc="Firefox PDF Reader in JavaScript"
Natanael Copa's avatar
Natanael Copa committed
130 131 132
	mkdir -p "$subpkgdir"/$_mozappdir/browser/chrome
	mv "$pkgdir"/$_mozappdir/browser/chrome/pdfjs \
		"$subpkgdir"/$_mozappdir/browser/chrome/
133 134
}

Natanael Copa's avatar
Natanael Copa committed
135
md5sums="06a4c0fe8d3a979aea2fce8d0fdbf328  firefox-24.0.source.tar.bz2
136
98bcd8b2d33037f12ca513882fc5d831  mozconfig
Natanael Copa's avatar
Natanael Copa committed
137
2328df219e042f6aaec361cbf83cf9e9  firefox-5.0-asciidel.patch
Natanael Copa's avatar
Natanael Copa committed
138
6b8d481d8fba55fa0ad4f26c02164da8  duckduckgo.patch
139
1515663477ce427cbdc42f04d8d5ca4e  vendor.js
140 141
ba96924ece1d77453e462429037a2ce5  firefox.desktop
6f38a5899034b7786cb1f75ad42032b8  firefox-safe.desktop"
Natanael Copa's avatar
Natanael Copa committed
142
sha256sums="86a6efa501e1b106b597a8506757f3a2db9d3a5cfcc61ea29a9ad0c834bea83b  firefox-24.0.source.tar.bz2
143 144
0988b03a0532293fbacfd995cdc93df2a10b873cebf4912e1a96cb86f2321312  mozconfig
e1e5b6ab3337a6af5c74be392d32fccfa315191191c622dac4f660157ebf4e7a  firefox-5.0-asciidel.patch
Natanael Copa's avatar
Natanael Copa committed
145
db057fd5448c3e4d40459fb8ee178296cc723e19efadb1e02a85a4e22a6e560a  duckduckgo.patch
146
d72ca759792cc8c88efc664d30087a139fed7fc3d7d058e4cd9ab287bb80ea46  vendor.js
147 148
b571c4a49884a3c98806246c9cc3e60c73d5a8f4aeb7f96217db0be1d6210eda  firefox.desktop
4b6de45753856a890f4482055666e77f9b01bdfb7e0df08bafaa3a4d9937eed3  firefox-safe.desktop"
Natanael Copa's avatar
Natanael Copa committed
149
sha512sums="541a26eb939a2cf9a2ec4f4469fdc12008f097c4f615cb196299cbdb855931df5aea288f842dce57e2bb0069ec76e2a748823474e30a6077a9138db5ddb3ee46  firefox-24.0.source.tar.bz2
150 151
f5a3842a04d3fbf433f70fbbbefbf8ee2fce2f25fa041bf4920f99c8842c8a16e0aeaf44e64af14cffcb743c8816ba7aebbbe13e07d0b17ee6a50dbad8f7f645  mozconfig
9ccc74883fa4f3861a5ddde1af9c3c0d151fda8ff64df979ee0565ecd2013a875894e5670a0c1d0a28fbb81fb88759777ce7fcb196e582caeb903c760859a1b1  firefox-5.0-asciidel.patch
Natanael Copa's avatar
Natanael Copa committed
152
a7d6a0420f70374a2fa6a74a18ab15c77451f45dc9226ec251f5635a970dbd45ed6cf571ae5ab81b8126951667fc61b1fc5dfb7b8a4d7cc6d465d39e842dc985  duckduckgo.patch
153
93570f821e59af4d233fc4b1df85e1d145a5e041ad402fd72921987a5a2f5218538d7a13d59bbf0bda5e7df1d5281407674a3765625936340106d1185b15b5d8  vendor.js
154 155
f3b7c3e804ce04731012a46cb9e9a6b0769e3772aef9c0a4a8c7520b030fdf6cd703d5e9ff49275f14b7d738fe82a0a4fde3bc3219dff7225d5db0e274987454  firefox.desktop
5dcb6288d0444a8a471d669bbaf61cdb1433663eff38b72ee5e980843f5fc07d0d60c91627a2c1159215d0ad77ae3f115dcc5fdfe87e64ca704b641aceaa44ed  firefox-safe.desktop"