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