aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
Diffstat (limited to 'games')
-rw-r--r--games/Makefile1
-rw-r--r--games/cchess/Makefile45
-rw-r--r--games/cchess/distinfo3
-rw-r--r--games/cchess/pkg-descr3
-rw-r--r--games/cchess/pkg-plist11
5 files changed, 63 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile
index 75bf586d20e9..8426466cd1b4 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -101,6 +101,7 @@
SUBDIR += cake
SUBDIR += cardpics
SUBDIR += cavezofphear
+ SUBDIR += cchess
SUBDIR += ceferino
SUBDIR += cgoban
SUBDIR += cgoban2
diff --git a/games/cchess/Makefile b/games/cchess/Makefile
new file mode 100644
index 000000000000..92c0089ea424
--- /dev/null
+++ b/games/cchess/Makefile
@@ -0,0 +1,45 @@
+# New ports collection makefile for: cchess
+# Date created: 10 May 2007
+# Whom: Yinghong.Liu <liu_yinghong@yahoo.com.cn>
+#
+# $FreeBSD$
+#
+
+PORTNAME= cchess
+PORTVERSION= 1.4
+CATEGORIES= games
+MASTER_SITES= ftp://local-distfiles.freebsd.org.cn/pub/china-ports/hamigua/
+
+MAINTAINER= liu_yinghong@yahoo.com.cn
+COMMENT= Very simple Chinese chess program
+
+LIB_DEPENDS= alleg.42:${PORTSDIR}/devel/allegro \
+ lirc_client.1:${PORTSDIR}/comms/lirc
+
+USE_GMAKE= yes
+
+SYSCONFDIR= ${PREFIX}/etc/cchess
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|qizi.bmp|${DATADIR}/qizi.bmp|' \
+ -e 's|xqbg.bmp|${DATADIR}/xqbg.bmp|' \
+ -e 's|BOOK.DAT|${DATADIR}/BOOK.DAT|' \
+ -e 's|big.dat|${DATADIR}/big.dat|' \
+ -e 's|jiang.wav|${DATADIR}/jiang.wav|' \
+ ${WRKSRC}/src/main.cpp
+ @${REINPLACE_CMD} -e 's|sdklircrc|${SYSCONFDIR}/sdklircrc|' \
+ ${WRKSRC}/src/aihomesdk.cpp
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/cchess ${LOCALBASE}/bin
+ ${MKDIR} ${SYSCONFDIR}
+ ${INSTALL_DATA} ${WRKSRC}/sdklircrc ${SYSCONFDIR}/sdklircrc.sample
+ if [ ! -f ${SYSCONFDIR}/sdklircrc ]; then \
+ ${INSTALL_DATA} ${WRKSRC}/sdklircrc ${SYSCONFDIR}; \
+ fi
+ ${MKDIR} ${DATADIR}
+.for i in BOOK.DAT jiang.wav big.dat qizi.bmp xqbg.bmp
+ ${INSTALL_DATA} ${WRKSRC}/$i ${DATADIR}
+.endfor
+
+.include <bsd.port.mk>
diff --git a/games/cchess/distinfo b/games/cchess/distinfo
new file mode 100644
index 000000000000..54b435b08f5d
--- /dev/null
+++ b/games/cchess/distinfo
@@ -0,0 +1,3 @@
+MD5 (cchess-1.4.tar.gz) = 61bbb745b4ae48cfa2fbb5743bde8716
+SHA256 (cchess-1.4.tar.gz) = 014581a947618d6b71e999d063b8f6ced1fbb1144686dde457255212fa82d1d8
+SIZE (cchess-1.4.tar.gz) = 1200743
diff --git a/games/cchess/pkg-descr b/games/cchess/pkg-descr
new file mode 100644
index 000000000000..e214a46082b4
--- /dev/null
+++ b/games/cchess/pkg-descr
@@ -0,0 +1,3 @@
+An very simple Chinese chess program.
+
+WWW: http://www.nchess.com/
diff --git a/games/cchess/pkg-plist b/games/cchess/pkg-plist
new file mode 100644
index 000000000000..f3711d21ebf1
--- /dev/null
+++ b/games/cchess/pkg-plist
@@ -0,0 +1,11 @@
+bin/cchess
+@unexec if cmp -s %D/etc/cchess/sdklircrc %D/etc/cchess/sdklircrc.sample; then rm -f %D/etc/cchess/sdklircrc; fi
+etc/cchess/sdklircrc.sample
+@exec if [ ! -f %D/etc/cchess/sdklircrc ]; then cp -p %D/etc/cchess/sdklircrc.sample %D/etc/cchess/sdklircrc; fi
+%%DATADIR%%/BOOK.DAT
+%%DATADIR%%/jiang.wav
+%%DATADIR%%/qizi.bmp
+%%DATADIR%%/xqbg.bmp
+%%DATADIR%%/big.dat
+@dirrmtry etc/cchess
+@dirrm %%DATADIR%%