# HG changeset patch # User Richard Dunbar # Date 1358053297 0 # Node ID 29b331997c77a3880fb395e8fc527057c8c4ad62 # Parent f4e2c53ca70101f5f6f571f5267a8ca74215358b get-opera: sync from cooking diff -r f4e2c53ca701 -r 29b331997c77 get-opera/stuff/get-opera --- a/get-opera/stuff/get-opera Fri Jan 11 07:59:33 2013 +0200 +++ b/get-opera/stuff/get-opera Sun Jan 13 05:01:37 2013 +0000 @@ -1,7 +1,11 @@ #!/bin/sh -e PACKAGE="opera" -URL=http://mirrors.dedipower.com/opera/linux/ +WEB_SITE="http://www.opera.com/" +CATEGORY="non-free" +DEPENDS="" +URL=http://mirror.switch.ch/ftp/mirror/opera/linux/ + ROOT="$1" [ -d "$ROOT" ] || ROOT="" @@ -28,7 +32,7 @@ # Download deb for RELEASE in $@ $(get_releases); do - FILE=$(wget -O- "$URL$RELEASE/" 2>/dev/null | grep -v next | sed 's|.*[Ff]="\(.*\)".*|\1|;/6.d/!d;q') + FILE=$(wget -O- "$URL$RELEASE/" 2>/dev/null |sed 's|.*[Ff]="\(.*\)".*|\1|;/6.d/!d;q'|sed 's/".*//') [ -n "$FILE" ] || continue wget $URL$RELEASE/$FILE [ -s $FILE ] && break @@ -41,17 +45,19 @@ exit 1 fi -mkdir opera -dpkg-deb -e $FILE opera/meta -dpkg-deb -x $FILE opera/fs +mkdir $PACKAGE +dpkg-deb -e $FILE $PACKAGE/meta +dpkg-deb -x $FILE $PACKAGE/fs # extracted pkg can be removed: Save RAM rm -f $FILE sed '/^Description:/,$!d;s/^Description://' \ - < opera/meta/control > opera/description.txt + < $PACKAGE/meta/control > $PACKAGE/description.txt -VERSION=$(grep ^Version opera/meta/control | awk '{ print $2 }') -mv opera opera-$VERSION -cd opera-$VERSION/fs +SHORT_DESC="$(sed '/^Description:/!d;s/.*: //' $PACKAGE/meta/control)" +MAINTAINER="$(sed '/^Maintainer:/!d;s/.*: //' $PACKAGE/meta/control)" +VERSION="$(sed '/^Version:/!d;s/.*: //' $PACKAGE/meta/control)" +mv $PACKAGE $PACKAGE-$VERSION +cd $PACKAGE-$VERSION/fs # Create menu mkdir -p usr/share/applications @@ -94,38 +100,39 @@ EOT cd ../.. -cat > opera-$VERSION/receipt < $PACKAGE-$VERSION/receipt <