summaryrefslogtreecommitdiff
path: root/opera/Pkgfile
blob: 2bb65da36e34f6215c35a5e63be39f2e6ed0d589 (plain)
    1 # Description: Lightweight web browser with news, e-mail and IRC.
    2 # URL: http://www.opera.com/
    3 # Maintainer: Danny Rawlins, monster dot romster at gmail dot com
    4 # Packager: Olle Gustafsson, ogg at linux dot se
    5 # Depends on: qt4
    6 
    7 name=opera
    8 version=12.14
    9 release=1
   10 source=(http://ftp.heanet.ie/pub/opera/linux/${version//./}/$name-$version-1738.x86_64.linux.tar.xz)
   11 
   12 build() {
   13 	cd $name-$version-*
   14 
   15 	mv share/doc/opera/LICENSE $SRC/
   16 	rm -rf share/doc/opera
   17 	rm -rf share/opera/package
   18 
   19 	# Replace PREFIX and SUFFIX in various files
   20 	sed -i \
   21 		-e "s:@@{PREFIX}:/usr:g" \
   22 		-e "s:@@{SUFFIX}::g" \
   23 		-e "s:@@{_SUFFIX}::g" \
   24 		-e "s:@@{USUFFIX}::g" \
   25 		share/mime/packages/opera-extension.xml \
   26 		share/man/man1/* \
   27 		share/applications/opera-browser.desktop
   28 
   29 	# Recreate wrappers
   30 	rm opera
   31 	echo '#!/bin/bash' > opera
   32 	echo 'export OPERA_DIR=/usr/share/opera' >> opera
   33 	echo 'export OPERA_PERSONALDIR="${HOME}/.opera"' >> opera
   34 	echo 'exec /usr/lib/opera/opera "$@"' >> opera
   35 
   36 	install -m 0755 -D opera $PKG/usr/bin/opera
   37 
   38 	# Install data
   39 	install -d $PKG/usr/{lib,share}
   40 	cp -r lib/opera $PKG/usr/lib/
   41 	cp -r share/applications $PKG/usr/share/
   42 	cp -r share/icons $PKG/usr/share/
   43 	cp -r share/man $PKG/usr/man/
   44 	cp -r share/mime $PKG/usr/share/
   45 	cp -r share/opera $PKG/usr/share/
   46 
   47 	# remove license.txt symlinks to doc directory
   48 	# which we remove
   49 	rm \
   50 		$PKG/usr/lib/opera/plugins/README \
   51 		$PKG/usr/share/opera/locale/en/license.txt \
   52 		$PKG/usr/share/opera/defaults/license.txt
   53 
   54 	cp $SRC/LICENSE \
   55                 $PKG/usr/share/opera/defaults/license.txt
   56 
   57 	ln $PKG/usr/share/opera/defaults/license.txt \
   58 		$PKG/usr/share/opera/locale/en/license.txt
   59 
   60 	find  "$PKG/usr/share/opera/locale/" \
   61 		-mindepth 1 -maxdepth 1 -type d \
   62 		-not -name en -exec rm -r {} +
   63 }

Generated by cgit