get-scripts annotate opera @ rev 71

opera: 404, update $URL
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Tue Sep 26 20:47:36 2017 +0200 (2017-09-26)
parents 8e84604f9739
children af72949c6633
rev   line source
pascal@34 1 SHORT_DESC="Opera browser"
pascal@0 2 WEB_SITE="http://www.opera.com/"
pascal@34 3 # end of get.list data
psychomaniak@71 4 URL=ftp://ftp.opera.com/pub/opera/linux/
pascal@0 5
pascal@0 6 get_releases()
pascal@0 7 {
pascal@0 8 wget -qO- "$URL?C=M;O=D" | sed 's|.*[Ff]="\([^"/]*\).*|\1|;/[^0-9b]/d'
pascal@0 9 }
pascal@0 10
pascal@0 11 # Download deb
psychomaniak@70 12 ### for RELEASE in $@ $(get_releases); do
psychomaniak@70 13 RELEASE=1216
pascal@0 14 TARBALL=$(wget -O- "$URL$RELEASE/" 2>/dev/null |sed 's|.*[Ff]="\(.*\)".*|\1|;/6.d/!d;q'|sed 's/".*//')
pascal@0 15 [ -n "$TARBALL" ] || continue
pascal@0 16 WGET_URL=$URL$RELEASE/$TARBALL
pascal@0 17 wget $WGET_URL
psychomaniak@70 18 ### [ -s $TARBALL ] && break
psychomaniak@70 19 ### done
pascal@0 20
pascal@63 21 [ -f $TARBALL ] || abort_package
pascal@0 22
pascal@0 23 mkdir $PACKAGE
pascal@0 24 dpkg-deb -e $TARBALL $PACKAGE/meta
pascal@0 25 dpkg-deb -x $TARBALL $PACKAGE/fs
pascal@0 26 # extracted pkg can be removed: Save RAM
pascal@0 27 rm -f $TARBALL
pascal@0 28 sed '/^Description:/,$!d;s/^Description://' \
pascal@0 29 < $PACKAGE/meta/control > $PACKAGE/description.txt
pascal@0 30
pascal@0 31 SHORT_DESC="$(sed '/^Description:/!d;s/.*: //' $PACKAGE/meta/control)"
pascal@0 32 MAINTAINER="$(sed '/^Maintainer:/!d;s/.*: //' $PACKAGE/meta/control)"
pascal@0 33 VERSION="$(sed '/^Version:/!d;s/.*: //' $PACKAGE/meta/control)"
pascal@0 34 mv $PACKAGE $PACKAGE-$VERSION
pascal@63 35 USR=$PACKAGE-$VERSION/fs/usr
pascal@0 36
psychomaniak@44 37 # Localized keyboard layout fix
pascal@63 38 busybox sed "s|sh$|sh\nexport XMODIFIERS=\"@im=none\"|" -i $USR/bin/opera
psychomaniak@44 39
pascal@0 40 # Create menu
pascal@63 41 mkdir -p $USR/share/applications
pascal@63 42 cat > $USR/share/applications/opera-browser.desktop <<EOT
pascal@0 43 [Desktop Entry]
al@48 44 Type=Application
pascal@0 45 Name=Opera
pascal@0 46 Name[af]=opera
pascal@0 47 Name[eo]=Opero
pascal@0 48 Name[zu]=I Opera
pascal@0 49 GenericName=Web browser
pascal@0 50 GenericName[bs]=Web preglednik
pascal@0 51 GenericName[de]=Web-Browser
pascal@0 52 GenericName[eo]=TTT-rigardilo
pascal@0 53 GenericName[es]=Navegador web
pascal@0 54 GenericName[et]=Veebibrauser
pascal@0 55 GenericName[eu]=Web arakatzailea
pascal@0 56 GenericName[fi]=WWW-selain
pascal@0 57 GenericName[fr]=Un navigateur web
pascal@0 58 GenericName[is]=Vafri
pascal@0 59 GenericName[it]=Browser Web
pascal@0 60 GenericName[nl]=webbrowser
pascal@0 61 GenericName[nn]=Nettlesar
pascal@0 62 GenericName[pt]=Navegador Web
pascal@0 63 GenericName[pt_BR]=Navegador
pascal@0 64 GenericName[ro]=Navigator de web
pascal@0 65 GenericName[sl]=Spletni brskalnik
pascal@0 66 GenericName[ven]=Buronza ya Webu
pascal@0 67 GenericName[xh]=Umkhangeli Zincwadi Zokubhaliweyo
pascal@0 68 GenericName[zu]=Umkhangeli zincwadi we Web
al@48 69 Comment=Web Browser
psychomaniak@44 70 Exec=opera %u
pascal@0 71 Terminal=false
al@48 72 Categories=Qt;Network;WebBrowser;
pascal@0 73 Icon=opera-browser
al@48 74 MimeType=text/html;text/xml;application/xhtml+xml;application/x-mimearchive;application/xml;application/rss+xml;application/rdf+xml;image/svg+xml;image/gif;image/jpeg;image/png;image/x-bmp;image/x-xbm;application/mime;
pascal@0 75 EOT
pascal@0 76
pascal@0 77 # Remove unwanted locale
pascal@63 78 mv $USR/share/opera/locale $USR/share/opera/locale-full
pascal@63 79 mkdir -p $USR/share/opera/locale
pascal@0 80 . /etc/locale.conf
pascal@21 81 for i in $LANG ${LANG/_/-} ${LANG:0:2} en fr ru pt de zh-cn ; do
pascal@63 82 [ -d $USR/share/opera/locale-full/$i ] &&
pascal@63 83 mv $USR/share/opera/locale-full/$i $USR/share/opera/locale
pascal@0 84 done
pascal@63 85 rm -rf $USR/share/opera/locale-full $USR/share/pixmaps