APKBUILD 3.25 KB
Newer Older
Ariadne Conill's avatar
Ariadne Conill committed
1 2 3
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=firefox
4
pkgver=16.0.2
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 29 30 31 32 33 34 35
             libxt-dev
             jpeg-dev
             bzip2-dev
             hunspell-dev
             startup-notification-dev
             sqlite-dev
             libidl-dev

Ariadne Conill's avatar
Ariadne Conill committed
36 37 38 39
	     autoconf2.13

	     python
	     zip
40
	     yasm
Ariadne Conill's avatar
Ariadne Conill committed
41 42 43

	     autoconf
	     automake
44 45 46
	     libtool

	     paxctl"
Ariadne Conill's avatar
Ariadne Conill committed
47 48
install=""
subpackages=""
49
source="http://releases.mozilla.org/pub/mozilla.org/${pkgname}/releases/${pkgver}/source/${pkgname}-${_pkgver}.source.tar.bz2
Ariadne Conill's avatar
Ariadne Conill committed
50
	mozconfig
Natanael Copa's avatar
Natanael Copa committed
51
	firefox-5.0-asciidel.patch
52 53
	firefox.desktop
	firefox-safe.desktop"
Ariadne Conill's avatar
Ariadne Conill committed
54

55 56
options="!strip"

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

Ariadne Conill's avatar
Ariadne Conill committed
60 61 62 63 64 65 66 67 68 69 70 71
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
72
	echo "ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul)" >> .mozconfig
73 74
	echo "ac_add_options --enable-debug-symbols" >> .mozconfig
	echo "ac_add_options --disable-install-strip" >>.mozconfig
Ariadne Conill's avatar
Ariadne Conill committed
75 76 77 78 79
}

build() {
	cd "$_builddir"

Natanael Copa's avatar
Natanael Copa committed
80 81 82
	# 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
83

Natanael Copa's avatar
Natanael Copa committed
84 85 86 87
#	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
88 89 90 91
}

package() {
	cd "$_builddir"
92 93 94 95
	make -j1 -f client.mk install \
		DESTDIR="$pkgdir" \
		MOZ_MAKE_FLAGS="$MAKEOPTS" \
		|| return 1
96 97 98

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

	# firefox currently does not work with mprotect. disable it for now
Natanael Copa's avatar
Natanael Copa committed
105 106 107 108 109 110 111 112 113 114
	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
115

Natanael Copa's avatar
Natanael Copa committed
116 117 118
exec $_mozappdir/firefox "\$@"
__EOF__
	chmod 755 "$pkgdir"/usr/bin/firefox
Ariadne Conill's avatar
Ariadne Conill committed
119 120
}

121
md5sums="1b360968ab05b2a59757d33514897915  firefox-16.0.2.source.tar.bz2
122
98bcd8b2d33037f12ca513882fc5d831  mozconfig
Natanael Copa's avatar
Natanael Copa committed
123
2328df219e042f6aaec361cbf83cf9e9  firefox-5.0-asciidel.patch
124 125
ba96924ece1d77453e462429037a2ce5  firefox.desktop
6f38a5899034b7786cb1f75ad42032b8  firefox-safe.desktop"