summaryrefslogtreecommitdiff
path: root/extra/xulrunner/PKGBUILD
blob: da74448ea2fe8dd0ba0b97bfd80751537c15a26c (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
# $Id: PKGBUILD 138761 2011-09-27 20:42:01Z ibiru $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Alexander Baldeck <alexander@archlinux.org>
pkgname=xulrunner
pkgver=7.0
_ffoxver=7.0
pkgrel=1
pkgdesc="Mozilla Runtime Environment"
arch=('i686' 'x86_64')
license=('MPL' 'GPL' 'LGPL')
depends=('gtk2' 'gcc-libs' 'libidl2' 'mozilla-common' 'nss' 'libxt' 'libxrender' 'hunspell' 'startup-notification' 'mime-types' 'dbus-glib' 'alsa-lib' 'libevent' 'sqlite3>=3.7.4' 'libnotify')
makedepends=('zip' 'pkg-config' 'diffutils' 'python2' 'wireless_tools' 'yasm' 'mesa')
url="http://wiki.mozilla.org/XUL:Xul_Runner"
source=(http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${_ffoxver}/source/firefox-${_ffoxver}.source.tar.bz2
        mozconfig
        mozilla-pkgconfig.patch)
options=('!emptydirs' '!buildflags')
replaces=('xulrunner-oss')
md5sums=('673a015a23e3fefa18d80db68c8b9fc1'
         '108a53313284908cc3afe5e29a7557e9'
         '639ea80e823543dd415b90c0ee804186')

build() {
  cd "${srcdir}/mozilla-release"
  cp "${srcdir}/mozconfig" .mozconfig

  #fix libdir/sdkdir - fedora
  patch -Np1 -i "${srcdir}/mozilla-pkgconfig.patch"

  export LDFLAGS="-Wl,-rpath,/usr/lib/xulrunner-${pkgver} -Wl,-O1,--sort-common,--hash-style=gnu,--as-needed"

  make -j1 -f client.mk build MOZ_MAKE_FLAGS="$MAKEFLAGS"
}

package() {
  cd "${srcdir}/mozilla-release"
  make -j1 -f client.mk DESTDIR="${pkgdir}" install

  # add xulrunner library path to ld.so.conf
  install -d ${pkgdir}/etc/ld.so.conf.d
  echo "/usr/lib/xulrunner-${pkgver}" > ${pkgdir}/etc/ld.so.conf.d/xulrunner.conf

  #wtf mozilla!
  chmod +x "${pkgdir}/usr/lib/xulrunner-devel-$pkgver/sdk/bin/xpt.py"
  sed -i 's|!/usr/bin/env python|!/usr/bin/env python2|' "${pkgdir}/usr/lib/xulrunner-devel-$pkgver/sdk/bin/xpt.py"
}