get-scripts annotate opera @ rev 21
opera: add ru locale
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Jul 28 10:04:21 2014 +0200 (2014-07-28) |
parents | ca290394cc08 |
children | 6ca05e6839e1 |
rev | line source |
---|---|
pascal@0 | 1 WEB_SITE="http://www.opera.com/" |
pascal@0 | 2 URL=http://mirror.switch.ch/ftp/mirror/opera/linux/ |
pascal@0 | 3 |
pascal@0 | 4 get_releases() |
pascal@0 | 5 { |
pascal@0 | 6 wget -qO- "$URL?C=M;O=D" | sed 's|.*[Ff]="\([^"/]*\).*|\1|;/[^0-9b]/d' |
pascal@0 | 7 } |
pascal@0 | 8 |
pascal@0 | 9 # Download deb |
pascal@0 | 10 for RELEASE in $@ $(get_releases); do |
pascal@0 | 11 TARBALL=$(wget -O- "$URL$RELEASE/" 2>/dev/null |sed 's|.*[Ff]="\(.*\)".*|\1|;/6.d/!d;q'|sed 's/".*//') |
pascal@0 | 12 [ -n "$TARBALL" ] || continue |
pascal@0 | 13 WGET_URL=$URL$RELEASE/$TARBALL |
pascal@0 | 14 wget $WGET_URL |
pascal@0 | 15 [ -s $TARBALL ] && break |
pascal@0 | 16 done |
pascal@0 | 17 |
pascal@0 | 18 [ -f $TARBALL ] || abort_package "Could not download $TARBALL from $URL. Exiting." |
pascal@0 | 19 |
pascal@0 | 20 mkdir $PACKAGE |
pascal@0 | 21 dpkg-deb -e $TARBALL $PACKAGE/meta |
pascal@0 | 22 dpkg-deb -x $TARBALL $PACKAGE/fs |
pascal@0 | 23 # extracted pkg can be removed: Save RAM |
pascal@0 | 24 rm -f $TARBALL |
pascal@0 | 25 sed '/^Description:/,$!d;s/^Description://' \ |
pascal@0 | 26 < $PACKAGE/meta/control > $PACKAGE/description.txt |
pascal@0 | 27 |
pascal@0 | 28 SHORT_DESC="$(sed '/^Description:/!d;s/.*: //' $PACKAGE/meta/control)" |
pascal@0 | 29 MAINTAINER="$(sed '/^Maintainer:/!d;s/.*: //' $PACKAGE/meta/control)" |
pascal@0 | 30 VERSION="$(sed '/^Version:/!d;s/.*: //' $PACKAGE/meta/control)" |
pascal@0 | 31 mv $PACKAGE $PACKAGE-$VERSION |
pascal@0 | 32 cd $PACKAGE-$VERSION/fs |
pascal@0 | 33 |
pascal@0 | 34 # Create menu |
pascal@0 | 35 mkdir -p usr/share/applications |
pascal@0 | 36 cat > usr/share/applications/opera-browser.desktop <<EOT |
pascal@0 | 37 [Desktop Entry] |
pascal@0 | 38 Version=1.0 |
pascal@0 | 39 TryExec=opera |
pascal@0 | 40 Encoding=UTF-8 |
pascal@0 | 41 Name=Opera |
pascal@0 | 42 Name[af]=opera |
pascal@0 | 43 Name[eo]=Opero |
pascal@0 | 44 Name[zu]=I Opera |
pascal@0 | 45 GenericName=Web browser |
pascal@0 | 46 GenericName[bs]=Web preglednik |
pascal@0 | 47 GenericName[de]=Web-Browser |
pascal@0 | 48 GenericName[eo]=TTT-rigardilo |
pascal@0 | 49 GenericName[es]=Navegador web |
pascal@0 | 50 GenericName[et]=Veebibrauser |
pascal@0 | 51 GenericName[eu]=Web arakatzailea |
pascal@0 | 52 GenericName[fi]=WWW-selain |
pascal@0 | 53 GenericName[fr]=Un navigateur web |
pascal@0 | 54 GenericName[is]=Vafri |
pascal@0 | 55 GenericName[it]=Browser Web |
pascal@0 | 56 GenericName[nl]=webbrowser |
pascal@0 | 57 GenericName[nn]=Nettlesar |
pascal@0 | 58 GenericName[pt]=Navegador Web |
pascal@0 | 59 GenericName[pt_BR]=Navegador |
pascal@0 | 60 GenericName[ro]=Navigator de web |
pascal@0 | 61 GenericName[sl]=Spletni brskalnik |
pascal@0 | 62 GenericName[ven]=Buronza ya Webu |
pascal@0 | 63 GenericName[xh]=Umkhangeli Zincwadi Zokubhaliweyo |
pascal@0 | 64 GenericName[zu]=Umkhangeli zincwadi we Web |
pascal@0 | 65 Exec=opera %u |
pascal@0 | 66 Terminal=false |
pascal@0 | 67 Categories=Application;Qt;Network;WebBrowser;X-Ximian-Main;X-Ximian-Toplevel |
pascal@0 | 68 Icon=opera-browser |
pascal@0 | 69 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 | 70 Comment=Web Browser |
pascal@0 | 71 Type=Application |
pascal@0 | 72 EOT |
pascal@0 | 73 cd ../.. |
pascal@0 | 74 |
pascal@0 | 75 # Remove unwanted locale |
pascal@0 | 76 mv $PACKAGE-$VERSION/fs/usr/share/opera/locale $PACKAGE-$VERSION/fs/usr/share/opera/locale-full |
pascal@0 | 77 mkdir -p $PACKAGE-$VERSION/fs/usr/share/opera/locale |
pascal@0 | 78 . /etc/locale.conf |
pascal@21 | 79 for i in $LANG ${LANG/_/-} ${LANG:0:2} en fr ru pt de zh-cn ; do |
pascal@0 | 80 [ -d $PACKAGE-$VERSION/fs/usr/share/opera/locale-full/$i ] && |
pascal@0 | 81 cp -a $PACKAGE-$VERSION/fs/usr/share/opera/locale-full/$i \ |
pascal@0 | 82 $PACKAGE-$VERSION/fs/usr/share/opera/locale |
pascal@0 | 83 done |
pascal@0 | 84 rm -rf $PACKAGE-$VERSION/fs/usr/share/opera/locale-full |
pascal@0 | 85 rm -rf $PACKAGE-$VERSION/fs/usr/share/pixmaps |
pascal@2 | 86 set +e |