mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
opera update
This commit is contained in:
parent
a203b459c8
commit
9ce8609473
@ -1,12 +1,10 @@
|
||||
#
|
||||
# Apps Packages for Chakra, part of chakra-project.org
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
pkgname=opera
|
||||
pkgver=11.64
|
||||
_buildver=1403
|
||||
pkgver=12.00
|
||||
_buildver=1467
|
||||
pkgrel=1
|
||||
pkgdesc="A fast and secure web browser and Internet suite."
|
||||
url="http://www.opera.com/browser/"
|
||||
@ -22,52 +20,18 @@ options=(!strip)
|
||||
license=('custom:opera')
|
||||
categories=('network')
|
||||
arch=('i686' 'x86_64')
|
||||
_barch=i386
|
||||
[ "$CARCH" = "x86_64" ] && _barch=x86_64
|
||||
source=(http://ftp.opera.com/pub/opera/linux/${pkgver/./}/opera-${pkgver}-${_buildver}.${_barch}.linux.tar.xz)
|
||||
md5sums=('efcc57782e85fc080c354dbf76fdef83')
|
||||
[ "$CARCH" = "x86_64" ] && md5sums=('7f5594b3ae08a438486a1cd8f4e12d68')
|
||||
|
||||
build() {
|
||||
cd opera-${pkgver}-${_buildver}.${_barch}.linux
|
||||
if [ "$CARCH" = "i686" ]; then
|
||||
_arch=i386
|
||||
source=(http://ftp.opera.com/pub/opera/linux/${pkgver/./}/opera-${pkgver}-${_buildver}.${_arch}.linux.tar.xz)
|
||||
md5sums=('c9a4a298e525ee61cbcd58059562c2b8')
|
||||
elif [ "$CARCH" = "x86_64" ]; then
|
||||
_arch=$CARCH
|
||||
source=(http://ftp.opera.com/pub/opera/linux/${pkgver/./}/opera-${pkgver}-${_buildver}.${_arch}.linux.tar.xz)
|
||||
md5sums=('c9a4a298e525ee61cbcd58059562c2b8')
|
||||
fi
|
||||
|
||||
# Create initial directory structure
|
||||
|
||||
mkdir -p ${pkgdir}/usr/bin
|
||||
|
||||
# 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.
|
||||
|
||||
install -D -m 644 ${pkgdir}/usr/share/opera/defaults/license.txt ${pkgdir}/usr/share/licenses/${pkgname}/license.txt
|
||||
}
|
||||
package() {
|
||||
opera-${pkgver}-${_buildver}.${_arch}.linux/install --prefix /usr --repackage "${pkgdir}/usr"
|
||||
install -D -m 644 "${pkgdir}/usr/share/${pkgname}/defaults/license.txt" "${pkgdir}/usr/share/licenses/${pkgname}/license.txt"
|
||||
}
|
Loading…
Reference in New Issue
Block a user