# HG changeset patch # User Liu Peng # Date 1252917156 0 # Node ID 44caf7cc6c81c7ce4dc9fc655494767557290227 # Parent 5541bcf1be04b6f15d5888a25f95e6cc15259a77 Add: get-wakoopa diff -r 5541bcf1be04 -r 44caf7cc6c81 get-wakoopa/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/get-wakoopa/receipt Mon Sep 14 08:32:36 2009 +0000 @@ -0,0 +1,15 @@ +# SliTaz package receipt. + +PACKAGE="get-wakoopa" +VERSION="1.00" +CATEGORY="non-free" +SHORT_DESC="Wakoopa is the perfect place to discover software and games online." +MAINTAINER="rocky@slitaz.org" +WEB_SITE="http://wakoopa.com" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/bin + cp stuff/get-wakoopa $fs/usr/bin +} diff -r 5541bcf1be04 -r 44caf7cc6c81 get-wakoopa/stuff/get-wakoopa --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/get-wakoopa/stuff/get-wakoopa Mon Sep 14 08:32:36 2009 +0000 @@ -0,0 +1,61 @@ +#!/bin/sh +# Wakoopa is the perfect place to discover software and games online. + +PACKAGE="wakoopa" +VERSION="1.1.1-2" +RPMPKG="$PACKAGE-$VERSION.i386.rpm" +URL="http://apt.wakoopa.com/$RPMPKG" +CUR_DIR=$(pwd) +TEMP_DIR=/tmp/$PACKAGE-$VERSION-$$ +ROOT="$1" + +# Check if we are root +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 1 +fi + +# Avoid reinstall +if [ -d $ROOT/var/lib/tazpkg/installed/$PACKAGE ]; then + echo -e "\n$PACKAGE package is already installed.\n" + exit 1 +fi + +# Create a TEMP_DIR +mkdir $TEMP_DIR +cd $TEMP_DIR + +# Download the file +wget $URL +if [ ! -f $RPMPKG ]; then + cd $CUR_DIR + rm -rf $TEMP_DIR + echo "Could not download $RPMPKG. Exiting." + exit 1 +fi + +rpm2cpio $RPMPKG | cpio -dium +mkdir -p $PACKAGE-$VERSION/fs +mv $TEMP_DIR/usr $PACKAGE-$VERSION/fs + +cd $TEMP_DIR + +cat > $PACKAGE-$VERSION/receipt << EOT +PACKAGE="$PACKAGE" +VERSION="$VERSION" +CATEGORY="non-free" +SHORT_DESC="Wakoopa Desktop Tracker." +DEPENDS="gtk+" +WEB_SITE="http://wakoopa.com" +EOT + +# Pack +tazpkg pack $PACKAGE-$VERSION + +# Install pseudo package +yes y | tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT + +# Clean +cd $CUR_DIR +rm -rf $TEMP_DIR