updated on Thu Jan 19 00:16:31 UTC 2012
[aur-mirror.git] / opera-116 / PKGBUILD
blob811a33b5507a7f6ea2bc858fbe36e9e8da854e46
1 # Maintainer: ruario
2 pkgname=opera-116 # Set to "opera" or "opera-next" if you want to replace either of these
3 _bigrelease=11.60
4 _buildver=1184
5 _randomizer=rc2
6 pkgver=${_bigrelease}_${_buildver}
7 pkgrel=1
8 pkgdesc="A fast and secure web browser and Internet suite. Development version."
9 url="http://www.opera.com/browser/"
10 depends=('gcc-libs' 'libxt' 'freetype2' 'libxext')
11 provides=('opera')
12 optdepends=('gstreamer0.10-base-plugins: HTML5 Video support' 'gstreamer0.10-good: HTML5 Video support')
13 install=opera-116.install
14 options=(!strip !zipman)
15 license=('custom:opera')
16 arch=('i686' 'x86_64')
17 _arch=i386
18 [ "$CARCH" = "x86_64" ] && _arch=x86_64
19 source=(http://snapshot.opera.com/unix/${_randomizer}_${_bigrelease}-${_buildver}/opera-${_bigrelease}-${_buildver}.${_arch}.linux.tar.xz http://people.opera.com/ruario/opera-next-icons_20111107.tar.xz)
20 sha256sums=('36539747b681096713dbe4674d64a901a807fb5719200dcdde1d3abb9ceefdb2' '4040aad19e11c6e32d3603467858bf58dd389b24a4314e7cbb8b86c9c7b689fd')
21 [ "$CARCH" = "x86_64" ] && sha256sums=('4f83bac65811f76a2068c6561fe1bca7fc2696b7dfb3adbed8d1e5d2582665f9' '4040aad19e11c6e32d3603467858bf58dd389b24a4314e7cbb8b86c9c7b689fd')
23 # Uncomment the following line, if you want your User Agent to include Arch Linux.
24 #_opdistro="Arch Linux"
26 package() {
27         opera-${_bigrelease}-${_buildver}.${_arch}.linux/install --prefix /usr --name ${pkgname} --repackage "${pkgdir}/usr"
28         install -D -m 644 "${pkgdir}/usr/share/${pkgname}/defaults/license.txt" "${pkgdir}/usr/share/licenses/${pkgname}/license.txt"
29         
30         # User Opera Next icon set if package name is set to Opera Next
31         if [ "${pkgname}" = "opera-next" ]; then
32                 tar -xf opera-next-icons_20111107.tar.xz -C "${pkgdir}"
33                 sed -i "s/^\(Product=\)opera$/\1opera-next/" "${pkgdir}/usr/share/opera-next/package-id.ini"
34         fi
35         
36         # Insert an Arch User Agent string if set
37         if [ -n "${_opdistro}" ]
38         then
39                 mkdir -p "${pkgdir}/usr/share/${pkgname}/custom/defaults"
40                 echo "[ISP]" > "${pkgdir}/usr/share/${pkgname}/custom/defaults/operaprefs.ini"
41                 echo "Id=${_opdistro}" >> "${pkgdir}/usr/share/${pkgname}/custom/defaults/operaprefs.ini"
42                 chmod 644 "${pkgdir}/usr/share/${pkgname}/custom/defaults/operaprefs.ini"
43         fi