# HG changeset patch # User Pascal Bellard # Date 1250011625 -7200 # Node ID a6c803aa430ea71312c1601f2ed23e630524df14 # Parent 151703776792ae3a4d336065ccc397f170f9c143 Add get-wink diff -r 151703776792 -r a6c803aa430e get-wink/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/get-wink/receipt Tue Aug 11 19:27:05 2009 +0200 @@ -0,0 +1,16 @@ +# SliTaz package receipt. + +PACKAGE="get-wink" +VERSION="1.00" +CATEGORY="non-free" +SHORT_DESC="Get a Tutorial and Presentation creation software." +MAINTAINER="pascal.bellard@slitaz.org" +WEB_SITE="http://www.debugmode.com/wink/" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/bin + cp stuff/get-wink $fs/usr/bin +} + diff -r 151703776792 -r a6c803aa430e get-wink/stuff/get-wink --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/get-wink/stuff/get-wink Tue Aug 11 19:27:05 2009 +0200 @@ -0,0 +1,73 @@ +#!/bin/sh -e + +ROOT="$1" +PACKAGE=${0#*get-} + +if test $(id -u) != 0 ; then + echo -e "\nYou must be root to run `basename $0`." + echo -e "Please type 'su' and root password to become super-user.\n" + exit 0 +fi + +if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then + [ -n "$ROOT" ] && exit 1 + tazpkg remove $PACKAGE + [ -d /var/lib/tazpkg/installed/$PACKAGE ] && exit 1 +fi +[ -d $ROOT/usr/share/$PACKAGE ] && rm -rf $ROOT/usr/share/$PACKAGE + +dl_urls() +{ + wget -O - http://www.debugmode.com/wink/download.php 2> /dev/null | \ + grep gz | sed 's/.*.*/\1gz/' +} + +WEB_SITE="http://www.debugmode.com/wink/" + +TMP_DIR=/tmp/get-$PACKAGE-$$-$RANDOM +CUR_DIR=$(pwd) +mkdir -p $TMP_DIR && cd $TMP_DIR + +# Download tarball +for i in $(dl_urls); do + TARBALL=$(basename $i) + wget $i && break +done + +VERSION=${TARBALL%.*} +VERSION=${VERSION%.tar} +VERSION=${VERSION#wink} + +# Extract +tar xzf $TARBALL + +# Install files +mkdir -p $PACKAGE-$VERSION/fs/usr/share/$PACKAGE $PACKAGE-$VERSION/fs/usr/bin +tar xzf installdata.tar.gz -C $PACKAGE-$VERSION/fs/usr/share/$PACKAGE +cat > $PACKAGE-$VERSION/fs/usr/bin/$PACKAGE < $PACKAGE-$VERSION/receipt <