Index: ipk/source/games_vier_gewinnt/CONTROL/control
===================================================================
--- ipk/source/games_vier_gewinnt/CONTROL/control	(revision 7083)
+++ ipk/source/games_vier_gewinnt/CONTROL/control	(revision 7083)
@@ -0,0 +1,10 @@
+Package: enigma2-plugin-games-vier_gewinnt
+Version: 1.0
+Architecture: sh4
+OE: Vier gewinnt
+Section: games
+Priority: optional
+Maintainer: AAF
+Homepage: http://www.aaf-digital.info
+Source: http://www.aaf-digital.info
+Description: Game for your AAF Duckbox
Index: ipk/source/games_vier_gewinnt/CONTROL/postinst
===================================================================
--- ipk/source/games_vier_gewinnt/CONTROL/postinst	(revision 7083)
+++ ipk/source/games_vier_gewinnt/CONTROL/postinst	(revision 7083)
@@ -0,0 +1,12 @@
+#!/bin/sh
+TMP=/tmp/.games
+
+echo "successfully installed"
+echo "syncing disk"
+sync
+if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
+	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
+	FREE=`expr $SPACE - 100`
+	echo new freespace size $FREE kb
+fi
+exit 0
Index: ipk/source/games_vier_gewinnt/CONTROL/postrm
===================================================================
--- ipk/source/games_vier_gewinnt/CONTROL/postrm	(revision 7083)
+++ ipk/source/games_vier_gewinnt/CONTROL/postrm	(revision 7083)
@@ -0,0 +1,14 @@
+#!/bin/sh
+TMP=/tmp/.games
+PLUGINDIR=/usr/lib/enigma2/python/Plugins/Extensions/Vier_gewinnt
+rm -r $PLUGINDIR > /dev/null 2>&1
+
+echo "successfully removed"
+echo "syncing disk"
+sync
+if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
+	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
+	FREE=`expr $SPACE - 100`
+	echo new freespace size $FREE kb
+fi
+exit 0
Index: ipk/source/games_vier_gewinnt/CONTROL/preinst
===================================================================
--- ipk/source/games_vier_gewinnt/CONTROL/preinst	(revision 7083)
+++ ipk/source/games_vier_gewinnt/CONTROL/preinst	(revision 7083)
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+TMP=/tmp/.games
+echo "syncing disk"
+sync
+
+model=`cat /etc/model`
+echo""
+echo "Checking your Boxtype...."
+echo "Some Plugins will not work correctly on your $model!"
+echo ""
+if [ "$model" = "" ]; then
+	echo "Sorry! This Plugin is not available for your $model because it will not work correctly!!!"
+	echo "Aborting installation..."
+	exit 1
+else
+	echo "Boxtype: $model OK"
+fi
+
+if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
+	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
+	FREE=`expr $SPACE - 100`
+	SIZE=17
+	echo "checking freespace"
+	echo packege size $SIZE kb
+	echo freespace size $FREE kb
+	if  [ "$FREE" -lt "$SIZE" ]; then
+		echo "sorry no freespace left on device"
+		exit 1
+	else
+		echo ok
+	fi
+fi   
+echo "installing Vier gewinnt ..."
+echo "checking OS"
+if  [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then                      
+	echo ---------------------------
+	echo DONT USE this IPK Package!!
+	echo ---
+	echo Only for AAF Image!!
+	echo ---------------------------
+	exit 1
+fi
+exit 0
Index: ipk/source/games_vier_gewinnt/CONTROL/prerm
===================================================================
--- ipk/source/games_vier_gewinnt/CONTROL/prerm	(revision 7083)
+++ ipk/source/games_vier_gewinnt/CONTROL/prerm	(revision 7083)
@@ -0,0 +1,11 @@
+#!/bin/sh
+TMP=/tmp/.games
+echo "syncing disk"
+sync
+if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
+	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
+	FREE=`expr $SPACE - 100`
+	echo freespace size $FREE kb
+fi
+echo "removing Vier gewinnt"
+exit 0
