# HG changeset patch # User Aleksej Bobylev # Date 1486524949 -7200 # Node ID 602cd7b0094da2716379f844ead3d05d2b18fa34 # Parent c2357bc8b86b1cb56458b06998f92e0bb192f5bb Add get-opera-blink diff -r c2357bc8b86b -r 602cd7b0094d get-opera-blink/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/get-opera-blink/receipt Wed Feb 08 05:35:49 2017 +0200 @@ -0,0 +1,17 @@ +# SliTaz package receipt. + +PACKAGE="get-opera-blink" +VERSION="1.00" +CATEGORY="non-free" +SHORT_DESC="Get the latest Opera Web browser (Blink engine)." +MAINTAINER="al.bobylev@gmail.com" +LICENSE="BSD" +WEB_SITE="https://www.opera.com/" +TAGS="browser" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/bin + cp $stuff/get-opera-blink $fs/usr/bin +} diff -r c2357bc8b86b -r 602cd7b0094d get-opera-blink/stuff/get-opera-blink --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/get-opera-blink/stuff/get-opera-blink Wed Feb 08 05:35:49 2017 +0200 @@ -0,0 +1,136 @@ +#!/bin/sh -e + +PACKAGE="opera-blink" +WEB_SITE="https://www.opera.com/" +CATEGORY="non-free" +DEPENDS="alsa-lib GConf gtk+ libcups libcurl libnotify nss xorg-libXScrnSaver xorg-libXtst" +URL="http://download1.operacdn.com/pub/opera/desktop/" + +. /lib/libtaz.sh + +while [ "${1:0:2}" == '--' ]; do shift; done +VERSION="$1" + +check_root + + +title "Welcome to $PACKAGE installer!" + +[ -z "$VERSION" ] && version_desc="latest" +if [ -z "$noinstall" ]; then + install_desc='yes' +else + install_desc='no'; keep='yes' +fi +[ -z "$keep" ] && keep_desc="no" + +cat < --root=/path/to/root --noinstall --keep +EOT + +separator; newline + +if [ -d "$root/var/lib/tazpkg/installed/$PACKAGE" ]; then + echo "Removing previous version..." + tazpkg -r $PACKAGE --root="$root/" + [ -d "$root/var/lib/tazpkg/installed/$PACKAGE" ] && + die "Can't remove previous version. Exiting." +fi + +TMP_DIR=$(mktemp -d) +CUR_DIR=$(pwd) +mkdir -p $TMP_DIR + +if [ -z $VERSION ]; then + echo -n "Determining latest release... " + VERSION=$(wget -qO- "$URL" | sed -n 's|.*href="[0-9.]*/">\(.*\)/<.*|\1|p' | tail -n1) + echo "$VERSION" +fi +FILE=$(wget -qO- "$URL$VERSION/linux" | sed -n 's|.*href=".*_i386.deb">\(.*\)<.*|\1|p' | tail -n1) +SIZE=$(wget -qO- "$URL$VERSION/linux" | fgrep $FILE | awk '{print $NF}') + +echo "Download size: $SIZE Bytes" +echo + +cd $TMP_DIR +wget $URL$VERSION/linux/$FILE +echo +if [ ! -f $FILE ]; then + cd $CUR_DIR + rm -rf $TMP_DIR + die "Could not download $FILE from $URL. Exiting." +fi + +action "Extracting the archive" +mkdir $PACKAGE +dpkg-deb -e $FILE $PACKAGE/meta +dpkg-deb -x $FILE $PACKAGE/fs +status + +rm -f $FILE +sed '/^Description:/,$!d; /^Description:/d' $PACKAGE/meta/control > $PACKAGE/description.txt + +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 + +cat > receipt <