wok rev 4077
Add: get-wakoopa
author | Liu Peng <rocky@slitaz.org> |
---|---|
date | Mon Sep 14 08:32:36 2009 +0000 (2009-09-14) |
parents | 5541bcf1be04 |
children | 0aad569f472b |
files | get-wakoopa/receipt get-wakoopa/stuff/get-wakoopa |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/get-wakoopa/receipt Mon Sep 14 08:32:36 2009 +0000 1.3 @@ -0,0 +1,15 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="get-wakoopa" 1.7 +VERSION="1.00" 1.8 +CATEGORY="non-free" 1.9 +SHORT_DESC="Wakoopa is the perfect place to discover software and games online." 1.10 +MAINTAINER="rocky@slitaz.org" 1.11 +WEB_SITE="http://wakoopa.com" 1.12 + 1.13 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.14 +genpkg_rules() 1.15 +{ 1.16 + mkdir -p $fs/usr/bin 1.17 + cp stuff/get-wakoopa $fs/usr/bin 1.18 +}
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/get-wakoopa/stuff/get-wakoopa Mon Sep 14 08:32:36 2009 +0000 2.3 @@ -0,0 +1,61 @@ 2.4 +#!/bin/sh 2.5 +# Wakoopa is the perfect place to discover software and games online. 2.6 + 2.7 +PACKAGE="wakoopa" 2.8 +VERSION="1.1.1-2" 2.9 +RPMPKG="$PACKAGE-$VERSION.i386.rpm" 2.10 +URL="http://apt.wakoopa.com/$RPMPKG" 2.11 +CUR_DIR=$(pwd) 2.12 +TEMP_DIR=/tmp/$PACKAGE-$VERSION-$$ 2.13 +ROOT="$1" 2.14 + 2.15 +# Check if we are root 2.16 +if test $(id -u) != 0 ; then 2.17 + echo -e "\nYou must be root to run `basename $0`." 2.18 + echo -e "Please type 'su' and root password to become super-user.\n" 2.19 + exit 1 2.20 +fi 2.21 + 2.22 +# Avoid reinstall 2.23 +if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then 2.24 + echo -e "\n$PACKAGE package is already installed.\n" 2.25 + exit 1 2.26 +fi 2.27 + 2.28 +# Create a TEMP_DIR 2.29 +mkdir $TEMP_DIR 2.30 +cd $TEMP_DIR 2.31 + 2.32 +# Download the file 2.33 +wget $URL 2.34 +if [ ! -f $RPMPKG ]; then 2.35 + cd $CUR_DIR 2.36 + rm -rf $TEMP_DIR 2.37 + echo "Could not download $RPMPKG. Exiting." 2.38 + exit 1 2.39 +fi 2.40 + 2.41 +rpm2cpio $RPMPKG | cpio -dium 2.42 +mkdir -p $PACKAGE-$VERSION/fs 2.43 +mv $TEMP_DIR/usr $PACKAGE-$VERSION/fs 2.44 + 2.45 +cd $TEMP_DIR 2.46 + 2.47 +cat > $PACKAGE-$VERSION/receipt << EOT 2.48 +PACKAGE="$PACKAGE" 2.49 +VERSION="$VERSION" 2.50 +CATEGORY="non-free" 2.51 +SHORT_DESC="Wakoopa Desktop Tracker." 2.52 +DEPENDS="gtk+" 2.53 +WEB_SITE="http://wakoopa.com" 2.54 +EOT 2.55 + 2.56 +# Pack 2.57 +tazpkg pack $PACKAGE-$VERSION 2.58 + 2.59 +# Install pseudo package 2.60 +yes y | tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT 2.61 + 2.62 +# Clean 2.63 +cd $CUR_DIR 2.64 +rm -rf $TEMP_DIR