blob: da1efacdc0636292787b2e623296df3236ae9c65 (
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=firefox
pkgver=30.0
_pkgver=$pkgver
_xulver=$pkgver
pkgrel=0
pkgdesc="firefox web browser"
url="http://www.firefox.com"
arch="all"
license="GPL LGPL MPL"
depends="xulrunner>=${_xulver}"
makedepends="xulrunner-dev>=${_xulver}
nspr-dev
nss-dev
gtk+-dev
mesa-dev
icu-dev
dbus-glib-dev
alsa-lib-dev
libvorbis-dev
libogg-dev
libtheora-dev
wireless-tools-dev
libnotify-dev
libevent-dev
libvpx-dev
libxt-dev
libjpeg-turbo-dev
bzip2-dev
hunspell-dev
startup-notification-dev
sqlite-dev
libidl-dev
gstreamer1-dev
gst-plugins-base1-dev
autoconf2.13
sed
python
zip
yasm
autoconf
automake
libtool
paxctl"
install=""
subpackages="$pkgname-pdfjs $pkgname-dbg"
source="ftp://ftp.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.bz2
mozconfig
duckduckgo.patch
vendor.js
firefox.desktop
firefox-safe.desktop"
_builddir="${srcdir}/mozilla-release"
_mozappdir=/usr/lib/firefox-$pkgver
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
sed -e "s/#${CLIBC}#//g" -i .mozconfig
echo "ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul)" >> .mozconfig
if [ -n "$DEBUG" ]; then
echo "ac_add_options --enable-debug-symbols" >> .mozconfig
echo "ac_add_options --disable-install-strip" >>.mozconfig
fi
}
build() {
cd "$_builddir"
# mozilla's buildsystem is on drugs
export CFLAGS="$(echo $CFLAGS | sed -e 's/-Wall//' -e 's/-fexceptions/-fno-exceptions/g')"
export CXXFLAGS="$CFLAGS"
# export LDFLAGS="-Wl,-rpath,${_mozappdir}"
make -j1 -f client.mk build \
STRIP="/bin/true" \
MOZ_MAKE_FLAGS="$MAKEOPTS" || return 1
}
package() {
cd "$_builddir"
make -j1 -f client.mk install \
DESTDIR="$pkgdir" \
MOZ_MAKE_FLAGS="$MAKEOPTS" \
|| return 1
install -m755 -d ${pkgdir}/usr/share/applications
install -m755 -d ${pkgdir}/usr/share/pixmaps
install -m644 "$_builddir"/browser/branding/official/default48.png \
${pkgdir}/usr/share/pixmaps/firefox.png || return 1
install -m644 ${srcdir}/firefox.desktop ${pkgdir}/usr/share/applications/firefox.desktop
install -m644 ${srcdir}/firefox-safe.desktop ${pkgdir}/usr/share/applications/firefox-safe.desktop
# firefox currently does not work with mprotect. disable it for now
local paxflags="-m"
[ "$CARCH" = "x86" ] && paxflags="-msp"
paxctl -c $paxflags "$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
libgl=$(scanelf -qF '#F%S' /usr/lib/libGL.so)
cat > "$pkgdir"/usr/bin/firefox << __EOF__
#!/bin/sh
# as a workaround for libGL's initial-exec TLS we preload libgl
# https://bugs.freedesktop.org/show_bug.cgi?id=35268
LD_PRELOAD=$libgl exec $_mozappdir/firefox "\$@"
__EOF__
chmod 755 "$pkgdir"/usr/bin/firefox
# install our vendor prefs
cat "$srcdir"/vendor.js >> "$pkgdir"/$_mozappdir/browser/defaults/preferences/firefox-branding.js
}
pdfjs() {
pkgdesc="Firefox PDF Reader in JavaScript"
mkdir -p "$subpkgdir"/$_mozappdir/browser/chrome
mv "$pkgdir"/$_mozappdir/browser/chrome/pdfjs \
"$subpkgdir"/$_mozappdir/browser/chrome/
}
md5sums="ac7e8c801ded4e6195182bf54c81acb6 firefox-30.0.source.tar.bz2
11e6b4bb7593d79fe8827952a3e73c74 mozconfig
6b8d481d8fba55fa0ad4f26c02164da8 duckduckgo.patch
1515663477ce427cbdc42f04d8d5ca4e vendor.js
ba96924ece1d77453e462429037a2ce5 firefox.desktop
6f38a5899034b7786cb1f75ad42032b8 firefox-safe.desktop"
sha256sums="1e95740a8cf7095e210fb6a2313c4d0fba4fdf44ee7c327d01f202638403c22c firefox-30.0.source.tar.bz2
dca72a9f140bbc37ec7a9bd81ee886f6730b5866fce4e6ca1ebd48ee4df52c42 mozconfig
db057fd5448c3e4d40459fb8ee178296cc723e19efadb1e02a85a4e22a6e560a duckduckgo.patch
d72ca759792cc8c88efc664d30087a139fed7fc3d7d058e4cd9ab287bb80ea46 vendor.js
b571c4a49884a3c98806246c9cc3e60c73d5a8f4aeb7f96217db0be1d6210eda firefox.desktop
4b6de45753856a890f4482055666e77f9b01bdfb7e0df08bafaa3a4d9937eed3 firefox-safe.desktop"
sha512sums="20c4db40a0b539ecc971f892c4b1e95eebd8a34bed89c74cc0ed33be4a845ef2dac357945dce3721d09088962dc3ab2336fde2f9cb6ce0e6d8e42d36d4e3f7de firefox-30.0.source.tar.bz2
869b7eb925ccc055ecc3b6fddfa4419b5d2b650d627e551564f76788ed157e1c0a6a42e52e92f65d330957d4839954590ca6f6cf6f26a54a8490bdef18047180 mozconfig
a7d6a0420f70374a2fa6a74a18ab15c77451f45dc9226ec251f5635a970dbd45ed6cf571ae5ab81b8126951667fc61b1fc5dfb7b8a4d7cc6d465d39e842dc985 duckduckgo.patch
93570f821e59af4d233fc4b1df85e1d145a5e041ad402fd72921987a5a2f5218538d7a13d59bbf0bda5e7df1d5281407674a3765625936340106d1185b15b5d8 vendor.js
f3b7c3e804ce04731012a46cb9e9a6b0769e3772aef9c0a4a8c7520b030fdf6cd703d5e9ff49275f14b7d738fe82a0a4fde3bc3219dff7225d5db0e274987454 firefox.desktop
5dcb6288d0444a8a471d669bbaf61cdb1433663eff38b72ee5e980843f5fc07d0d60c91627a2c1159215d0ad77ae3f115dcc5fdfe87e64ca704b641aceaa44ed firefox-safe.desktop"
|