contrib/opera/Pkgfile

64 lines
1.7 KiB
Plaintext
Raw Normal View History

2009-01-11 16:16:41 +01:00
# Description: Lightweight web browser with news, e-mail and IRC.
# URL: http://www.opera.com/
2014-11-10 13:28:07 +01:00
# Maintainer: Danny Rawlins, crux at romster dot me
2009-01-11 16:16:41 +01:00
# Packager: Olle Gustafsson, ogg at linux dot se
# Depends on: qt4
name=opera
2014-01-25 01:27:41 +01:00
version=12.16
2009-01-11 16:16:41 +01:00
release=1
2014-01-25 01:27:41 +01:00
source=(http://ftp.heanet.ie/pub/opera/linux/${version//./}/$name-$version-1860.x86_64.linux.tar.xz)
2009-01-11 16:16:41 +01:00
build() {
cd $name-$version-*
2010-11-04 10:39:33 +01:00
2011-01-09 11:12:16 +01:00
mv share/doc/opera/LICENSE $SRC/
2010-11-04 10:39:33 +01:00
rm -rf share/doc/opera
rm -rf share/opera/package
2011-01-09 11:12:16 +01:00
2010-11-04 10:39:33 +01: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" \
2012-06-18 11:01:22 +02:00
share/mime/packages/opera-extension.xml \
2010-11-04 10:39:33 +01:00
share/man/man1/* \
2012-06-18 11:01:22 +02:00
share/applications/opera-browser.desktop
2010-11-04 10:39:33 +01:00
# 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
# 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 11:12:16 +01:00
# remove license.txt symlinks to doc directory
# which we remove
2010-11-04 10:39:33 +01:00
rm \
2011-01-09 11:12:16 +01: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-04 16:04:23 +02:00
find "$PKG/usr/share/opera/locale/" \
-mindepth 1 -maxdepth 1 -type d \
-not -name en -exec rm -r {} +
2009-01-11 16:16:41 +01:00
}