Commit c8e86650 authored by Adrián Chaves Fernández (Gallaecio)'s avatar Adrián Chaves Fernández (Gallaecio)
Browse files

Added Too Hard For You, based on Arch Linux PKGBUILD.

parent 1d4f880e
#
# Games Packages for Chakra, part of chakra-project.org
#
# Maintainer: Adrián Chaves Fernández (Gallaecio) <adriyetichaves gmail.com>
pkgname=toohardforyou
_pkgname=2H4U
pkgver=1.3
pkgrel=1
pkgdesc="Mix between a Tetris-like game and a wall breaker."
url="https://sourceforge.net/projects/toohardforyou"
license=('GPL')
arch=('i686' 'x86_64')
depends=('sdl_ttf' 'sdl_mixer' 'sdl_image' 'gcc-libs')
source=("http://downloads.sourceforge.net/$pkgname/$_pkgname-${pkgver}_SOURCES.tar.gz")
md5sums=('e5a4b473c8f7cc3ed4acdf29513d6ab9')
install=(install.sh)
build() {
cd $srcdir/$_pkgname/scripts
make
}
package() {
cd $srcdir/$_pkgname
install -d $pkgdir/usr/share/$pkgname
cp -R 2H4U aide data help $pkgdir/usr/share/$pkgname/
mkdir -p $pkgdir/usr/bin
echo "#!/bin/sh" > $pkgdir/usr/bin/$pkgname
echo "cd /usr/share/$pkgname" >> $pkgdir/usr/bin/$pkgname
echo "./2H4U" >> $pkgdir/usr/bin/$pkgname
chmod +x $pkgdir/usr/bin/$pkgname
}
pkgname=toohardforyou
post_install() {
if [ -e /usr/share/$pkgname/data/HighScores.dat ]; then
if [ -e /usr/share/$pkgname/data/config.dat ]; then
echo "Highscores and config files will be keeped"
else
touch /usr/share/$pkgname/data/config.dat
touch /usr/share/$pkgname/data/HighScores.dat
chmod 777 /usr/share/$pkgname/data/{config.dat,HighScores.dat}
fi
else
touch /usr/share/$pkgname/data/config.dat
touch /usr/share/$pkgname/data/HighScores.dat
chmod 777 /usr/share/$pkgname/data/{config.dat,HighScores.dat}
fi
}
post_upgrade() {
post_install $1
}
post_remove() {
cp /usr/share/share/$pkgname/data/config.dat /usr/share/share/$pkgname/data/config.dat.back
cp /usr/share/share/$pkgname/data/HighScores.dat /usr/share/share/$pkgname/data/HighScores.dat.back
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment