get-scripts view opera @ rev 39

geogebra: update
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Apr 29 18:51:12 2015 +0200 (2015-04-29)
parents ebd0372803bc
children a2a6f1bd608f
line source
1 SHORT_DESC="Opera browser"
2 WEB_SITE="http://www.opera.com/"
3 # end of get.list data
4 URL=http://mirror.switch.ch/ftp/mirror/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 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 "Could not download $TARBALL from $URL. Exiting."
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 cd $PACKAGE-$VERSION/fs
36 # Create menu
37 mkdir -p usr/share/applications
38 cat > usr/share/applications/opera-browser.desktop <<EOT
39 [Desktop Entry]
40 Version=1.0
41 TryExec=opera
42 Encoding=UTF-8
43 Name=Opera
44 Name[af]=opera
45 Name[eo]=Opero
46 Name[zu]=I Opera
47 GenericName=Web browser
48 GenericName[bs]=Web preglednik
49 GenericName[de]=Web-Browser
50 GenericName[eo]=TTT-rigardilo
51 GenericName[es]=Navegador web
52 GenericName[et]=Veebibrauser
53 GenericName[eu]=Web arakatzailea
54 GenericName[fi]=WWW-selain
55 GenericName[fr]=Un navigateur web
56 GenericName[is]=Vafri
57 GenericName[it]=Browser Web
58 GenericName[nl]=webbrowser
59 GenericName[nn]=Nettlesar
60 GenericName[pt]=Navegador Web
61 GenericName[pt_BR]=Navegador
62 GenericName[ro]=Navigator de web
63 GenericName[sl]=Spletni brskalnik
64 GenericName[ven]=Buronza ya Webu
65 GenericName[xh]=Umkhangeli Zincwadi Zokubhaliweyo
66 GenericName[zu]=Umkhangeli zincwadi we Web
67 Exec=opera %u
68 Terminal=false
69 Categories=Application;Qt;Network;WebBrowser;X-Ximian-Main;X-Ximian-Toplevel
70 Icon=opera-browser
71 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
72 Comment=Web Browser
73 Type=Application
74 EOT
75 cd ../..
77 # Remove unwanted locale
78 mv $PACKAGE-$VERSION/fs/usr/share/opera/locale $PACKAGE-$VERSION/fs/usr/share/opera/locale-full
79 mkdir -p $PACKAGE-$VERSION/fs/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 $PACKAGE-$VERSION/fs/usr/share/opera/locale-full/$i ] &&
83 cp -a $PACKAGE-$VERSION/fs/usr/share/opera/locale-full/$i \
84 $PACKAGE-$VERSION/fs/usr/share/opera/locale
85 done
86 rm -rf $PACKAGE-$VERSION/fs/usr/share/opera/locale-full
87 rm -rf $PACKAGE-$VERSION/fs/usr/share/pixmaps
88 set +e