1 Summary: A great persistant online chess game
2 Summary(pl): Wspania³a internetowa gra w szachy
7 Group: Applications/WWW
8 Source0: http://dl.sourceforge.net/webchess/%{name}_%{version}.zip
9 # Source0-md5: e1a0dc90959a4e8475854a6e7fb4f0b9
11 URL: http://webchess.sourceforge.net/
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 %define _webchessdir %{_datadir}/%{name}
21 %define _sysconfdir /etc/%{name}
24 A great persistant online chess game using PHP/MySQL on the backend
25 and HTML/JavaScript on the front-end, which includes move validation,
26 CHECK checking, pawn promotion and undo. It also has a login system
27 which allows multiple simultaneous games.
30 Wspania³a internetowa gra w szachy, u¿ywaj±ca PHP/MySQL po stronie
31 backendu i HTML/JavaScript po stronie interfejsu u¿ytkownika. Zawiera
32 kontrolê ruchów, sprawdzanie szachu, promocjê pionów oraz cofanie. Ma
33 tak¿e system logowania, który pozwala na wiele jednoczesnych gier.
39 rm -rf $RPM_BUILD_ROOT
40 install -d $RPM_BUILD_ROOT%{_webchessdir} \
41 $RPM_BUILD_ROOT{%{_sysconfdir},/etc/httpd}
43 cp -af images javascript *.php *.css chess.inc $RPM_BUILD_ROOT%{_webchessdir}
44 rm -f $RPM_BUILD_ROOT%{_webchessdir}/config.php
46 install config.php $RPM_BUILD_ROOT%{_sysconfdir}
47 ln -sf %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_webchessdir}/config.php
49 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
52 rm -rf $RPM_BUILD_ROOT
55 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
56 echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
57 elif [ -d /etc/httpd/httpd.conf ]; then
58 ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
60 if [ -f /var/lock/subsys/httpd ]; then
61 /usr/sbin/apachectl restart 1>&2
65 if [ "$1" = "0" ]; then
67 if [ -d /etc/httpd/httpd.conf ]; then
68 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
70 grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
71 /etc/httpd/httpd.conf.tmp
72 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
73 if [ -f /var/lock/subsys/httpd ]; then
74 /usr/sbin/apachectl restart 1>&2
80 %defattr(644,root,root,755)
82 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
83 %config(noreplace) %verify(not md5 mtime size) /etc/httpd/%{name}.conf
86 %{_webchessdir}/images
87 %{_webchessdir}/javascript
88 %{_webchessdir}/chess.inc