1 Summary: A great persistant online chess game
2 Summary(pl): Wspania³a internetowa gra w szachy
6 License: GNU General Public License (GPL)
7 Group: Applications/WWW
8 Source0: http://dl.sourceforge.net/webchess/%{name}_%{version}.zip
9 # Source0-md5: e1a0dc90959a4e8475854a6e7fb4f0b9
11 URL: http://webchess.sourceforge.net
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 %define _webchessdir %{_datadir}/%{name}
19 %define _sysconfdir /etc/%{name}
22 A great persistant online chess game using PHP/MySQL on the backend
23 and HTML/JavaScript on the front-end, which includes move validation,
24 CHECK checking, pawn promotion and undo. It also has a login system
25 which allows multiple simultaneous games.
28 Wspania³a internetowa gra w szachy, oparta na PHP/MySQL i
29 HTML/JavaScript. Posiada wiele ciekawych funkcji oraz system
30 logowania, który zapewnia gre zespo³ow±
33 %setup -q -c %{name}-%{version}
36 rm -rf $RPM_BUILD_ROOT
37 install -d $RPM_BUILD_ROOT%{_webchessdir} \
38 $RPM_BUILD_ROOT{%{_sysconfdir},/etc/httpd}
40 cp -af images javascript *.php *.css chess.inc $RPM_BUILD_ROOT%{_webchessdir}
41 rm -f $RPM_BUILD_ROOT%{_webchessdir}/config.php
43 install config.php $RPM_BUILD_ROOT%{_sysconfdir}
44 ln -sf %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_webchessdir}/config.php
46 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
49 rm -rf $RPM_BUILD_ROOT
52 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
53 echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
54 elif [ -d /etc/httpd/httpd.conf ]; then
55 ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
57 if [ -f /var/lock/subsys/httpd ]; then
58 /usr/sbin/apachectl restart 1>&2
62 if [ "$1" = "0" ]; then
64 if [ -d /etc/httpd/httpd.conf ]; then
65 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
67 grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
68 /etc/httpd/httpd.conf.tmp
69 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
70 if [ -f /var/lock/subsys/httpd ]; then
71 /usr/sbin/apachectl restart 1>&2
78 %defattr(644,root,root,755)
80 %attr(640,root,http) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*
81 %config(noreplace) %verify(not size mtime md5) /etc/httpd/%{name}.conf
84 %{_webchessdir}/images/
85 %{_webchessdir}/javascript/
86 %{_webchessdir}/chess.inc