2009-01-12 02:16:41 +11:00
|
|
|
# Description: Lightweight web browser with news, e-mail and IRC.
|
|
|
|
# URL: http://www.opera.com/
|
2010-12-21 19:03:43 +11:00
|
|
|
# Maintainer: Danny Rawlins, monster dot romster at gmail dot com
|
2009-01-12 02:16:41 +11:00
|
|
|
# Packager: Olle Gustafsson, ogg at linux dot se
|
|
|
|
# Depends on: qt4
|
|
|
|
|
|
|
|
name=opera
|
2012-01-26 19:22:20 +11:00
|
|
|
version=11.61
|
2009-01-12 02:16:41 +11:00
|
|
|
release=1
|
2012-01-26 19:22:20 +11:00
|
|
|
source=(http://ftp.heanet.ie/pub/opera/linux/${version//./}/$name-$version-1250.i386.linux.tar.xz)
|
2009-01-12 02:16:41 +11:00
|
|
|
|
|
|
|
build() {
|
|
|
|
cd $name-$version-*
|
2010-11-04 20:39:33 +11:00
|
|
|
|
2011-01-09 21:12:16 +11:00
|
|
|
mv share/doc/opera/LICENSE $SRC/
|
2010-11-04 20:39:33 +11:00
|
|
|
rm -rf share/doc/opera
|
|
|
|
rm -rf share/opera/package
|
2011-01-09 21:12:16 +11:00
|
|
|
|
2010-11-04 20:39:33 +11:00
|
|
|
# Replace PREFIX and SUFFIX in various files
|
|
|
|
sed -i \
|
|
|
|
-e "s:@@{PREFIX}:/usr:g" \
|
|
|
|
-e "s:@@{SUFFIX}::g" \
|
|
|
|
-e "s:@@{_SUFFIX}::g" \
|
|
|
|
-e "s:@@{USUFFIX}::g" \
|
|
|
|
share/mime/packages/opera-widget.xml \
|
|
|
|
share/man/man1/* \
|
|
|
|
share/applications/opera-browser.desktop \
|
|
|
|
share/applications/opera-widget-manager.desktop
|
|
|
|
|
|
|
|
# Recreate wrappers
|
|
|
|
rm opera
|
|
|
|
echo '#!/bin/bash' > opera
|
|
|
|
echo 'export OPERA_DIR=/usr/share/opera' >> opera
|
|
|
|
echo 'export OPERA_PERSONALDIR="${HOME}/.opera"' >> opera
|
|
|
|
echo 'exec /usr/lib/opera/opera "$@"' >> opera
|
|
|
|
|
|
|
|
install -m 0755 -D opera $PKG/usr/bin/opera
|
|
|
|
|
|
|
|
rm opera-widget-manager
|
|
|
|
echo '#!/bin/bash' > opera-widget-manager
|
|
|
|
echo 'exec /usr/bin/opera --widgetmanager "$@"' >> opera-widget-manager
|
|
|
|
|
|
|
|
install -m 0755 -D opera-widget-manager $PKG/usr/bin/opera-widget-manager
|
|
|
|
|
|
|
|
# Install data
|
|
|
|
install -d $PKG/usr/{lib,share}
|
|
|
|
cp -r lib/opera $PKG/usr/lib/
|
|
|
|
cp -r share/applications $PKG/usr/share/
|
|
|
|
cp -r share/icons $PKG/usr/share/
|
|
|
|
cp -r share/man $PKG/usr/man/
|
|
|
|
cp -r share/mime $PKG/usr/share/
|
|
|
|
cp -r share/opera $PKG/usr/share/
|
|
|
|
|
2011-01-09 21:12:16 +11:00
|
|
|
# remove license.txt symlinks to doc directory
|
|
|
|
# which we remove
|
2010-11-04 20:39:33 +11:00
|
|
|
rm \
|
2011-01-09 21:12:16 +11:00
|
|
|
$PKG/usr/lib/opera/plugins/README \
|
|
|
|
$PKG/usr/share/opera/locale/en/license.txt \
|
|
|
|
$PKG/usr/share/opera/defaults/license.txt
|
|
|
|
|
|
|
|
cp $SRC/LICENSE \
|
|
|
|
$PKG/usr/share/opera/defaults/license.txt
|
|
|
|
|
|
|
|
ln $PKG/usr/share/opera/defaults/license.txt \
|
|
|
|
$PKG/usr/share/opera/locale/en/license.txt
|
2009-09-05 00:04:23 +10:00
|
|
|
|
|
|
|
find "$PKG/usr/share/opera/locale/" \
|
|
|
|
-mindepth 1 -maxdepth 1 -type d \
|
|
|
|
-not -name en -exec rm -r {} +
|
2009-01-12 02:16:41 +11:00
|
|
|
}
|