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