desktop/opera/PKGBUILD

74 lines
2.7 KiB
Bash
Raw Normal View History

2010-05-31 02:50:48 +08:00
#
2012-05-10 23:11:58 +08:00
# Apps Packages for Chakra, part of chakra-project.org
2010-05-31 02:50:48 +08:00
#
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
2010-05-31 00:30:09 +08:00
pkgname=opera
2012-05-10 23:11:58 +08:00
pkgver=11.64
_buildver=1403
2011-01-27 21:03:04 +08:00
pkgrel=1
2010-07-02 17:42:49 +08:00
pkgdesc="A fast and secure web browser and Internet suite."
url="http://www.opera.com/browser/"
2011-05-17 23:38:49 +08:00
depends=('gcc-libs' 'libxt' 'freetype2' 'libxext')
2010-07-02 17:42:49 +08:00
optdepends=('gtk2: GTK integration' \
2012-03-06 04:05:16 +08:00
'kde-runtime: KDE4 integration' \
2011-05-17 23:38:49 +08:00
'gstreamer0.10-base-plugins: HTML5 open codecs support'
'gstreamer0.10-good: HTML5 open codecs support'
'gstreamer0.10-ffmpeg: HTML5 not so open codecs support'
'gstreamer0.10-bad-plugins: HTML5 not so open codecs support')
2010-07-02 17:42:49 +08:00
install=${pkgname}.install
options=(!strip)
2010-05-31 00:30:09 +08:00
license=('custom:opera')
categories=('network')
2010-05-31 00:30:09 +08:00
arch=('i686' 'x86_64')
2010-07-02 17:42:49 +08:00
_barch=i386
[ "$CARCH" = "x86_64" ] && _barch=x86_64
2011-05-17 23:38:49 +08:00
source=(http://ftp.opera.com/pub/opera/linux/${pkgver/./}/opera-${pkgver}-${_buildver}.${_barch}.linux.tar.xz)
2012-05-10 23:21:46 +08:00
md5sums=('efcc57782e85fc080c354dbf76fdef83')
2012-05-10 23:11:58 +08:00
[ "$CARCH" = "x86_64" ] && md5sums=('7f5594b3ae08a438486a1cd8f4e12d68')
2010-05-31 00:30:09 +08:00
build() {
2010-07-02 17:42:49 +08:00
cd opera-${pkgver}-${_buildver}.${_barch}.linux
2010-05-31 00:30:09 +08:00
2010-07-02 17:42:49 +08:00
# Create initial directory structure
2010-05-31 00:30:09 +08:00
2010-07-02 17:42:49 +08:00
mkdir -p ${pkgdir}/usr/bin
2010-05-31 00:30:09 +08:00
2010-07-02 17:42:49 +08:00
# Create 'opera' and 'opera-widget-manager' wrapper scripts and make them executable
cat <<EOF > ${pkgdir}/usr/bin/opera
#!/bin/sh
export OPERA_DIR=\${OPERA_DIR:-/usr/share/opera}
exec /usr/lib/opera/opera "\$@"
EOF
cat <<EOF > ${pkgdir}/usr/bin/opera-widget-manager
#!/bin/sh
exec /usr/bin/opera --widgetmanager "\$@"
EOF
chmod 755 ${pkgdir}/usr/bin/opera*
# Copy over 'lib/' and 'share/'
cp -R lib ${pkgdir}/usr/
cp -R share ${pkgdir}/usr/
# Patch variables in the *.desktop, MIME and man files to reflect the final install location.
sed -i ${pkgdir}/usr/share/applications/opera-browser.desktop -e "s|@@{PREFIX}|/usr|" -e "s|@@{[U_]*SUFFIX}||"
sed -i ${pkgdir}/usr/share/applications/opera-widget-manager.desktop -e "s|@@{PREFIX}|/usr|" -e "s|@@{[U_]*SUFFIX}||"
sed -i ${pkgdir}/usr/share/applications/opera-widget-installer.desktop -e "s|@@{PREFIX}|/usr|" -e "s|@@{[U_]*SUFFIX}||"
sed -i ${pkgdir}/usr/share/mime/packages/opera-widget.xml -e "s|@@{[U_]*SUFFIX}||"
sed -i ${pkgdir}/usr/share/mime/packages/opera-unite-application.xml -e "s|@@{[U_]*SUFFIX}||"
gzip -d ${pkgdir}/usr/share/man/man1/opera.1.gz
sed -i ${pkgdir}/usr/share/man/man1/opera.1 -e "s|@@{PREFIX}|/usr|" -e "s|@@{[U_]*SUFFIX}||"
gzip -d ${pkgdir}/usr/share/man/man1/opera-widget-manager.1.gz
sed -i ${pkgdir}/usr/share/man/man1/opera-widget-manager.1 -e "s|@@{PREFIX}|/usr|" -e "s|@@{[U_]*SUFFIX}||"
# Place the license in the standard Chakra location.
2010-07-02 17:42:49 +08:00
install -D -m 644 ${pkgdir}/usr/share/opera/defaults/license.txt ${pkgdir}/usr/share/licenses/${pkgname}/license.txt
2010-05-31 00:30:09 +08:00
}