get-scripts view opera @ rev 72

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