summaryrefslogtreecommitdiffstats
path: root/abs/extra/community/firefox/PKGBUILD
blob: 191c9133a81115b178cc6c868453c343495ed880 (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
# $Id: PKGBUILD 46468 2009-07-18 13:24:45Z jgc $
# Contributor: Jakub Schmidtke <sjakub@gmail.com>

pkgname=firefox
pkgver=3.5.1
pkgrel=3
_xulver=1.9.1.1
pkgdesc="Standalone web browser from mozilla.org"
arch=(i686 x86_64)
license=('MPL' 'GPL' 'LGPL')
depends=("xulrunner>=${_xulver}" 'desktop-file-utils' "nspr>=4.8")
makedepends=('zip' 'pkgconfig' 'diffutils' 'libgnomeui>=2.24.1' 'python')
replaces=('firefox3')
install=firefox.install
url="http://www.mozilla.org/projects/firefox"
source=(http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${pkgver}/source/firefox-${pkgver}-source.tar.bz2
        mozconfig
        firefox.desktop
        firefox-safe.desktop
        mozilla-firefox-1.0-lang.patch
        browser-defaulturls.patch
        firefox-version.patch
	browser-app-makefile.patch
	http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.tar.gz)
md5sums=('18169e189785d680827d4fce94524449'
         '3c928b11918d22377eba01de34debc19'
         '68cf02788491c6e846729b2f2913bf79'
         '5e68cabfcf3c021806b326f664ac505e'
         'bd5db57c23c72a02a489592644f18995'
         '346d74ec560e7bbf453c02ff21f4b868'
         '1dd9a10df0b9e4cf332eadc326d78e07'
         '165c43a5b03a0bf7ad2e7210b0d8c82c'
         '6306980e40a3266b4b6c173bfcfdc946')

build() {
  cd "${srcdir}/mozilla-1.9.1"
  patch -Np1 -i "${srcdir}/mozilla-firefox-1.0-lang.patch" || return 1
  patch -Np0 -i "${srcdir}/browser-defaulturls.patch" || return 1
  patch -Np1 -i "${srcdir}/firefox-version.patch" || return 1

  cp "${srcdir}/mozconfig" .mozconfig
  unset CFLAGS
  unset CXXFLAGS

  export LDFLAGS="-Wl,-rpath,/usr/lib/firefox-3.5"

  make -j1 -f client.mk configure MOZ_MAKE_FLAGS="${MAKEFLAGS}" || return 1
  cd browser/app
  patch -p2 < "${srcdir}/browser-app-makefile.patch" || return 1
  cd ../..
  make -j1 -f client.mk build MOZ_MAKE_FLAGS="${MAKEFLAGS}" || return 1
  make -j1 DESTDIR="${pkgdir}" install || return 1

  rm -f ${pkgdir}/usr/lib/firefox-3.5/libjemalloc.so

  install -m755 -d ${pkgdir}/usr/share/applications
  install -m755 -d ${pkgdir}/usr/share/pixmaps
  install -m644 ${srcdir}/mozilla-1.9.1/browser/branding/unofficial/default48.png ${pkgdir}/usr/share/pixmaps/firefox.png || return 1
  install -m644 ${srcdir}/firefox.desktop ${pkgdir}/usr/share/applications/ || return 1
  install -m644 ${srcdir}/firefox-safe.desktop ${pkgdir}/usr/share/applications/ || return 1

  # Install the flash player plugin.

  mkdir -p ${pkgdir}/usr/lib/firefox-3.5/plugins
  install -m755 ${srcdir}/libflashplayer.so ${pkgdir}/usr/lib/firefox-3.5/plugins || return 1

  # This is to stop firefox from crashing when the flashplayer (youtube) is 
  # set to full screen. To test if it is still necessary with updates to 
  # this package, run /usr/bin/firefox.bin without setting the LD_PRELOAD var.

  mv ${pkgdir}/usr/bin/firefox ${pkgdir}/usr/bin/firefox.bin
  echo "#!/bin/bash
export LD_PRELOAD=/usr/lib/libGL.so.1
/usr/bin/firefox.bin" > ${pkgdir}/usr/bin/firefox
  chmod 755 ${pkgdir}/usr/bin/firefox
}