CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
pacman: initial import (verified compilation).
[attic/ports/games-cross.git] / graywood / Pkgfile
index 5af4180893740d5448c425db9fbb1c7556065ff1..866811302954b79969b741e65ab4747e46c56677 100644 (file)
@@ -1,18 +1,31 @@
 # Description: A Clone of Darkwood, an old mac game 
 # URL: http://sourceforge.net/projects/graywood
 # Maintainer: Victor Martinez, pitillo at ono dot com
-# Arch Maintainer: CRUX-ARM System Team, crux-arm at mikeux dot dyndns dot org
+# Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
 # Depends on: ncurses
 
 name=graywood
 version=v0.0.2
-release=1
+release=2
 source=(http://dl.sourceforge.net/project/$name/$name/$name-$version/$name-$version.tar)
 
 build() {
   cd $SRC
   tar xvf $name-$version.tar
   cd $version/source/graywood
+  mv ../clearscreenfiles/nix/clearscreen_fcn.h .
+  sed -e 's|pause|read|g' -i *
   $CXX main.cpp -o graywood 
-  install -D -m 0755 graywood $PKG/usr/bin/graywood
+  mkdir -p $PKG/usr/{share/graywood,bin}
+  install -D -m 0755 graywood $PKG/usr/share/graywood/graywood
+  mv *.txt $PKG/usr/share/graywood/
+  cat > $PKG/usr/bin/graywood <<EOF
+#!/bin/bash
+
+cd /usr/share/graywood/
+./graywood \$@
+
+# End of file
+EOF
+  chmod +x $PKG/usr/bin/graywood
 }