# $Id: PKGBUILD 82 2009-07-17 19:56:55Z aaron $ # Maintainer: Abhishek Dasgupta # Contributor: SmackleFunky pkgname=bsd-games pkgver=2.17 pkgrel=8 pkgdesc="A linux port for a collection of BSD command line games." url="ftp://metalab.unc.edu/pub/Linux/games/" arch=('i686' 'x86_64') install=$pkgname.install license=('BSD') depends=('gcc-libs' 'words' 'bash') makedepends=('flex' 'bison' 'm4') source=(ftp://metalab.unc.edu/pub/Linux/games/$pkgname-$pkgver.tar.gz \ config.params stdio.h.diff gamescreen.h.diff number.c.diff bsd-games-2.17-64bit.patch) build() { cd ${srcdir}/$pkgname-$pkgver [ "$CARCH" = "x86_64" ] && (patch -p1 < ../bsd-games-2.17-64bit.patch || return 1) cp ${srcdir}/config.params . # Patches sed -i "s%PKGDIR%$pkgdir%" config.params || return 1 patch -p1 -i ${srcdir}/stdio.h.diff || return 1 patch -p1 -i ${srcdir}/gamescreen.h.diff || return 1 # Incorporated some fixes from Debian patch -p1 -i ${srcdir}/number.c.diff || return 1 sed -i "s/FISH/GO-FISH/g; s/\.Nm fish/\.Nm go-fish/g" fish/fish.6 || return 1 sed -i "s/tenths/tenth/g" tests/number.-0.1 || return 1 sed -i "s/Elegy{ Written in a Country Church{-| }Yard:/Elegy{ Written in a Country Church{-| }Yard}:/g" \ quiz/datfiles/poetry || return 1 sed -i "s/\.tI friend/\.It friend/g" hunt/hunt/hunt.6.in || return 1 sed -i "s/it\'s initial/its initial/g" backgammon/teachgammon/ttext1.c || return 1 sed -i "s/two player\'s/two players/g" backgammon/teachgammon/ttext2.c || return 1 sed -i "s/\.I range/\.It range/g" arithmetic/arithmetic.6 || return 1 sed -i "s/game were the/game where the/g" gomoku/gomoku.6 || return 1 # Installation ./configure make || return 1 make install || return 1 # Fix permissions rmdir ${pkgdir}/tmp mkdir -p ${pkgdir}/usr/share/bsdgames/data/hack/save chown -R root:games ${pkgdir}/var/lib/bsdgames chmod 664 ${pkgdir}/var/lib/bsdgames/* chmod 664 ${pkgdir}/var/lib/bsdgames/{hack,phantasia}/* chmod 775 ${pkgdir}/var/lib/bsdgames/{hack,phantasia} # Remove conflict with xscreensaver and fish mv ${pkgdir}/usr/bin/fish ${pkgdir}/usr/bin/go-fish mv ${pkgdir}/usr/share/man/man6/fish.6.gz ${pkgdir}/usr/share/man/man6/go-fish.6.gz mv ${pkgdir}/usr/share/man/man6/worm.6.gz $startdir/pkg/usr/share/man/man6/worm-game.6.gz # Install documentation and license for f in AUTHORS BUGS NEWS ChangeLog; do install -D -m644 $f ${pkgdir}/usr/share/doc/$pkgname/$f done rm ${pkgdir}/usr/share/doc/trek.me install -D -m644 COPYING ${pkgdir}/usr/share/licenses/$pkgname/COPYING } md5sums=('238a38a3a017ca9b216fc42bde405639' 'a7c5ac05eb71f7eb1eedf02b9328f4d8' '784f68c796b9e099ac008aecef1af998' '9c0fa6e2345bd0a7945c9a41d5ba68aa' '47249a90f38ccb4dd07625b245bbc728' '257813b76a41c8b2c02701571c804227')