updated on Mon Jan 16 12:07:49 UTC 2012
[aur-mirror.git] / xulrunner-oss / PKGBUILD
blob924c875c9fdacdba04f042a7e2179d8b0c3ca2cf
1 # $Id: PKGBUILD 114705 2011-03-15 15:11:28Z ibiru $
2 # Maintainer: Jan de Groot <jgc@archlinux.org>
3 # Contributor: Alexander Baldeck <alexander@archlinux.org>
4 pkgname=xulrunner-oss
5 pkgver=2.0.1
6 _ffoxver=4.0.1
7 pkgrel=1
8 pkgdesc="Mozilla Runtime Environment compiled with OSS support"
9 arch=('i686' 'x86_64')
10 license=('MPL' 'GPL' 'LGPL')
11 depends=('gtk2' 'gcc-libs' 'libidl2' 'mozilla-common' 'nss' 'libxt' 'libxrender' 'hunspell' 'startup-notification' 'mime-types' 'dbus-glib' 'libevent' 'sqlite3>=3.7.4' 'libnotify')
12 makedepends=('zip' 'pkg-config' 'diffutils' 'python2' 'wireless_tools' 'yasm' 'mesa' 'autoconf2.13')
13 url="http://wiki.mozilla.org/XUL:Xul_Runner"
14 source=(http://releases.mozilla.org/pub/mozilla.org/firefox/releases/${_ffoxver}/source/firefox-${_ffoxver}.source.tar.bz2
15         mozconfig
16         mozilla-pkgconfig.patch
17         xulrunner-version.patch
18         xulrunner-omnijar.patch
19         port_gnomevfs_to_gio.patch
20         oss.patch)
21 options=('!emptydirs')
22 conflicts=('xulrunner')
23 provides=("xulrunner=${pkgver}")
24 md5sums=('9abda7d23151e97913c8555a64c13f34'
25          '2358a2ddd35bcdd62ff42442dfe548d9'
26          '639ea80e823543dd415b90c0ee804186'
27          'a0236f6c3e55f60b7888d8cf137ff209'
28          '0bf82bc6677e3ce57fd20a147fe8d7b1'
29          '42f83468b296452fb754a81a4317ca64'
30          '81032ce49c2a5ac15d62155bcc42d3ed')
32 build() {
33   cd "${srcdir}/mozilla-2.0"
34   cp "${srcdir}/mozconfig" .mozconfig
36   #fix libdir/sdkdir - fedora
37   patch -Np1 -i "${srcdir}/mozilla-pkgconfig.patch"
39   #Force installation to the same path for every version
40   patch -Np1 -i "${srcdir}/xulrunner-version.patch"
42   patch -Np1 -i "${srcdir}/xulrunner-omnijar.patch"
44   patch -Np1 -i "${srcdir}/port_gnomevfs_to_gio.patch"
46   patch -Np0 -i "${srcdir}/oss.patch"
47   sed -i 's/sydney_audio_alsa/sydney_audio_oss/' media/libsydneyaudio/src/Makefile.in
48   sed -i '/EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)/d' layout/build/Makefile.in
49   sed -i '/EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)/d' toolkit/library/libxul-config.mk
51   unset CFLAGS
52   unset CXXFLAGS
53   export CXXFLAGS="-fpermissive"
55   make -j1 -f client.mk build MOZ_MAKE_FLAGS="$MAKEFLAGS"
58 package() {
59   cd "${srcdir}/mozilla-2.0"
60   make -j1 -f client.mk DESTDIR="${pkgdir}" install
62   #Remove included dictionaries, add symlink to system myspell path.
63   #Note: this will cause file conflicts when users have installed dictionaries in the old location
64   rm -rf "${pkgdir}/usr/lib/xulrunner-2.0/dictionaries"
65   ln -sf /usr/share/myspell/dicts "${pkgdir}/usr/lib/xulrunner-2.0/dictionaries"
67   # add xulrunner library path to ld.so.conf
68   install -d ${pkgdir}/etc/ld.so.conf.d
69   echo "/usr/lib/xulrunner-2.0" > ${pkgdir}/etc/ld.so.conf.d/xulrunner.conf