wok-stable annotate get-wink/stuff/get-wink @ rev 5477
Added acl-dev to build depends of cups-pam.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Thu May 06 00:33:31 2010 -0400 (2010-05-06) |
parents | 32959e7975fc |
children |
rev | line source |
---|---|
pascal@3883 | 1 #!/bin/sh -e |
pascal@3883 | 2 |
pascal@3883 | 3 ROOT="$1" |
pascal@3883 | 4 PACKAGE=${0#*get-} |
pascal@3883 | 5 |
pascal@3883 | 6 if test $(id -u) != 0 ; then |
pascal@3883 | 7 echo -e "\nYou must be root to run `basename $0`." |
pascal@3883 | 8 echo -e "Please type 'su' and root password to become super-user.\n" |
pascal@3883 | 9 exit 0 |
pascal@3883 | 10 fi |
pascal@3883 | 11 |
pascal@3883 | 12 if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then |
pascal@3883 | 13 [ -n "$ROOT" ] && exit 1 |
pascal@3883 | 14 tazpkg remove $PACKAGE |
pascal@3883 | 15 [ -d /var/lib/tazpkg/installed/$PACKAGE ] && exit 1 |
pascal@3883 | 16 fi |
pascal@3883 | 17 [ -d $ROOT/usr/share/$PACKAGE ] && rm -rf $ROOT/usr/share/$PACKAGE |
pascal@3883 | 18 |
pascal@3883 | 19 dl_urls() |
pascal@3883 | 20 { |
pascal@3883 | 21 wget -O - http://www.debugmode.com/wink/download.php 2> /dev/null | \ |
pascal@3883 | 22 grep gz | sed 's/.*<a href=\(.*\)gz>.*/\1gz/' |
pascal@3883 | 23 } |
pascal@3883 | 24 |
pascal@3883 | 25 WEB_SITE="http://www.debugmode.com/wink/" |
pascal@3883 | 26 |
pascal@3883 | 27 TMP_DIR=/tmp/get-$PACKAGE-$$-$RANDOM |
pascal@3883 | 28 CUR_DIR=$(pwd) |
pascal@3883 | 29 mkdir -p $TMP_DIR && cd $TMP_DIR |
pascal@3883 | 30 |
pascal@3883 | 31 # Download tarball |
pascal@3883 | 32 for i in $(dl_urls); do |
pascal@3883 | 33 TARBALL=$(basename $i) |
pascal@3883 | 34 wget $i && break |
pascal@3883 | 35 done |
pascal@3893 | 36 if [ ! -f $TARBALL ]; then |
pascal@3893 | 37 cd $CUR_DIR |
pascal@3893 | 38 rm -rf $TMP_DIR |
pascal@3893 | 39 echo "Could not download $TARBALL. Exiting." |
pascal@3893 | 40 exit 1 |
pascal@3893 | 41 fi |
pascal@3883 | 42 |
pascal@3883 | 43 VERSION=${TARBALL%.*} |
pascal@3883 | 44 VERSION=${VERSION%.tar} |
pascal@3883 | 45 VERSION=${VERSION#wink} |
pascal@3883 | 46 |
pascal@3883 | 47 # Extract |
pascal@3883 | 48 tar xzf $TARBALL |
pascal@3883 | 49 |
jozee@4994 | 50 # extracted pkg can be removed: Save RAM |
jozee@4994 | 51 rm -rf $TARBALL |
jozee@4994 | 52 |
pascal@3883 | 53 # Install files |
pascal@3883 | 54 mkdir -p $PACKAGE-$VERSION/fs/usr/share/$PACKAGE $PACKAGE-$VERSION/fs/usr/bin |
pascal@3883 | 55 tar xzf installdata.tar.gz -C $PACKAGE-$VERSION/fs/usr/share/$PACKAGE |
pascal@3883 | 56 cat > $PACKAGE-$VERSION/fs/usr/bin/$PACKAGE <<EOT |
pascal@3883 | 57 #!/bin/sh |
pascal@3883 | 58 exec $PACKAGE-$VERSION/fs/usr/share/$PACKAGE/$PACKAGE "$@" |
pascal@3883 | 59 EOT |
pascal@3883 | 60 chmod +x $PACKAGE-$VERSION/fs/usr/bin/$PACKAGE |
pascal@3883 | 61 |
pascal@3883 | 62 # Create pseudo package |
pascal@3883 | 63 cat > $PACKAGE-$VERSION/receipt <<EOT |
pascal@3883 | 64 # SliTaz package receipt. |
pascal@3883 | 65 |
pascal@3883 | 66 PACKAGE="$PACKAGE" |
pascal@3883 | 67 VERSION="$VERSION" |
pascal@3883 | 68 CATEGORY="non-free" |
pascal@3883 | 69 SHORT_DESC="Tutorial and Presentation creation software." |
pascal@3883 | 70 WEB_SITE="$WEB_SITE" |
pascal@3883 | 71 DEPENDS="gtk+ atk pango glib xorg-libXi xorg-libXext xorg-libX11 libstdc++5" |
pascal@3883 | 72 EOT |
pascal@3883 | 73 |
pascal@3883 | 74 # Pack |
pascal@3883 | 75 tazpkg pack $PACKAGE-$VERSION |
pascal@3883 | 76 |
jozee@4994 | 77 # Clean to save RAM memory |
jozee@4994 | 78 rm -rf $PACKAGE-$VERSION |
jozee@4994 | 79 |
pascal@3883 | 80 # Install pseudo package |
pascal@3883 | 81 tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT |
pascal@3883 | 82 |
pascal@3883 | 83 # Clean |
pascal@3883 | 84 cd $CUR_DIR |
pascal@3883 | 85 rm -rf $TMP_DIR |