updated on Mon Jan 16 20:00:43 UTC 2012
[aur-mirror.git] / firefox-hg / PKGBUILD
blob7e079dd9f96335ad769331d8a6e0b4e195c68ed4
1 # Contributor: MutantMonkey <mutantmonkey@gmail.com>
2 # Contributor: Simon Gomizelj <simongmzlj@gmail.com>
4 pkgname=firefox-hg
5 pkgver=77958
6 pkgrel=1
7 pkgdesc="Standalone web browser from mozilla.org, latest development version"
8 _ffver="10.0a1"
9 url="http://www.mozilla.org/projects/firefox/"
10 arch=('i686' 'x86_64')
11 license=('MPL' 'GPL' 'LGPL')
12 depends=('gtk2' 'gcc-libs' 'mozilla-common' 'nss>=3.12.10' 'libxt' 'libxrender'
13          'hunspell' 'startup-notification' 'mime-types' 'dbus-glib' 'alsa-lib'
14          'libevent' 'sqlite3>=3.7.4' 'libnotify' 'desktop-file-utils' 'libvpx'
15          'lcms' 'nspr>=4.8.8' 'libevent' 'libpng' 'cairo')
16 makedepends=('unzip' 'zip' 'pkg-config' 'diffutils' 'python2' 'wireless_tools' 'yasm'
17              'mesa' 'autoconf2.13' 'gconf' 'xorg-server-xvfb')
18 provides=("firefox=$_ffver")
19 url="http://www.mozilla.org/projects/firefox"
20 install=firefox.install
21 source=(mozconfig
22         firefox-hg.desktop
23         mozilla-firefox-1.0-lang.patch)
24 md5sums=('36dedfdcbe68e08b53b1740f7a107339'
25          '4022581eb05405b82c489d5ea16b1a17'
26          'bd5db57c23c72a02a489592644f18995')
28 _hgroot="http://hg.mozilla.org"
29 _hgrepo=mozilla-central
31 build() {
32   cd "$srcdir/mozilla-central"
34   cp "$srcdir/mozconfig" .mozconfig
35   patch -Np1 -i "$srcdir/mozilla-firefox-1.0-lang.patch"
37   # Kill @PRE_RELEASE_SUFFIX@ from browser.xul because it
38   # gets set to \177 for an unknown reason
39   sed -i 's/@PRE_RELEASE_SUFFIX@//g' \
40       browser/base/content/browser.xul
42   export LDFLAGS="-Wl,-rpath,/usr/lib/firefox-$_ffver -Wl,-O1,--sort-common,--hash-style=gnu,--as-needed"
43   export PYTHON="/usr/bin/python2"
45   # PGO
46   # sed -i '/^NO_PROFILE_GUIDED_OPTIMIZE = 1$/d' \
47   #   memory/jemalloc/Makefile.in
48   # echo 'LDFLAGS += -lX11 -lXrender' \
49   #   >> layout/build/Makefile.in
51   # LD_PRELOAD="" /usr/bin/Xvfb -nolisten tcp -extension GLX -screen 0 1280x1024x24 :99 &
52   # LD_PRELOAD="" DISPLAY=:99 make -j1 -f client.mk profiledbuild MOZ_MAKE_FLAGS="$MAKEFLAGS"
53   # kill $! || true
54   make -j1 -f client.mk MOZ_MAKE_FLAGS="$MAKEFLAGS"
57 package() {
58   cd "$srcdir/mozilla-central"
59   make -j1 -f client.mk DESTDIR="$pkgdir" install
61   # rm -f "$pkgdir/usr/bin/firefox"
62   mv "$pkgdir/usr/bin/firefox" "$pkgdir/usr/bin/firefox-hg"
64   # update firefox.sh launcher with proper Firefox version
65   # sed -i "s/firefox-hg/firefox-$_ffver/g" "$srcdir/firefox.sh"
66   # install -m755 "$srcdir/firefox.sh" "$pkgdir/usr/bin/firefox-hg"
68   for i in 16x16 32x32 48x48; do
69     install -Dm644 browser/branding/nightly/default${i/x*/}.png \
70       "$pkgdir/usr/share/icons/hicolor/$i/apps/firefox-hg.png"
71   done
73   install -Dm644 browser/branding/nightly/content/icon64.png \
74     "$pkgdir/usr/share/icons/hicolor/64x64/apps/firefox-hg.png"
76   install -Dm644 browser/branding/nightly/mozicon128.png \
77     "$pkgdir/usr/share/icons/hicolor/128x128/apps/firefox-hg.png"
79   install -Dm644 "$srcdir/firefox-hg.desktop" \
80     "$pkgdir/usr/share/applications/firefox-hg.desktop"
82   # We don't want the development stuff
83   rm -r "$pkgdir"/usr/{include,lib/firefox-devel-$_ffver,share/idl}
85 md5sums=('b2a0786b12f828c8c72230ad8205b4af'
86          '4022581eb05405b82c489d5ea16b1a17'
87          'bd5db57c23c72a02a489592644f18995')