get-scripts view opera @ rev 31

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