Receipt for: cgames
source
PACKAGE="cgames"
VERSION="2.2b"
CATEGORY="games"
SHORT_DESC="Games for the Linux Console."
MAINTAINER="pascal.bellard@slitaz.org"
LICENSE="GPL2"
WEB_SITE="https://www.muppetlabs.com/~breadbox/software/cgames.html"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="https://www.muppetlabs.com/~breadbox/pub/software/$TARBALL"
DEPENDS="ncurses"
BUILD_DEPENDS="ncurses-dev"
current_version()
{
wget -O - ${WGET_URL%/*} 2>/dev/null | \
sed '/cgames-/!d;s|.*cgames-||;s|.tar.*||' | sort -Vr | sed q
}
compile_rules()
{
export LDFLAGS="$LDFLAGS -ltinfo"
# SliTaz narrow libncurses lacks keypad; link the wide libncursesw instead
# (-lncurses is injected by configure via LOADLIBES)
find . -name configure -exec sed -i 's/-lncurses\b/-lncursesw/g' {} +
sed -i -e 's|install -.*\$|&(destdir)/$|' \
-e "s|^prefix|destdir = $DESTDIR\\n&|" \
-e 's/g games/g root/' \
*/Makefile.in
sed -i 's/.* getline(.*/#define getline mygetline\n&/' \
*/fileread.h
./configure \
--prefix=/usr \
--mandir=/usr/share/man \
--datadir=/usr/share \
--disable-mouse \
--with-ncurses \
$CONFIGURE_ARGS &&
make &&
make install
}
genpkg_rules()
{
mkdir -p $fs/usr/share
cp -a $install/usr/games $fs/usr
cp -a $install/usr/share/cblocks $fs/usr/share
cp -a $install/usr/share/csokoban $fs/usr/share
find $fs -type f -name '*.txt' -exec chmod a-x \{\} \;
}