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/
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 %define _webchessdir %{_datadir}/%{name}
20 %define _sysconfdir /etc/%{name}
23 A great persistant online chess game using PHP/MySQL on the backend
24 and HTML/JavaScript on the front-end, which includes move validation,
25 CHECK checking, pawn promotion and undo. It also has a login system
26 which allows multiple simultaneous games.
29 Wspania³a internetowa gra w szachy, u¿ywaj±ca PHP/MySQL po stronie
30 backendu i HTML/JavaScript po stronie interfejsu u¿ytkownika. Zawiera
31 kontrolê ruchów, sprawdzanie szachu, promocjê pionów oraz cofanie.
32 Ma tak¿e system logowania, który pozwala na wiele jednoczesnych gier.
38 rm -rf $RPM_BUILD_ROOT
39 install -d $RPM_BUILD_ROOT%{_webchessdir} \
40 $RPM_BUILD_ROOT{%{_sysconfdir},/etc/httpd}
42 cp -af images javascript *.php *.css chess.inc $RPM_BUILD_ROOT%{_webchessdir}
43 rm -f $RPM_BUILD_ROOT%{_webchessdir}/config.php
45 install config.php $RPM_BUILD_ROOT%{_sysconfdir}
46 ln -sf %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_webchessdir}/config.php
48 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
51 rm -rf $RPM_BUILD_ROOT
54 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
55 echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
56 elif [ -d /etc/httpd/httpd.conf ]; then
57 ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
59 if [ -f /var/lock/subsys/httpd ]; then
60 /usr/sbin/apachectl restart 1>&2
64 if [ "$1" = "0" ]; then
66 if [ -d /etc/httpd/httpd.conf ]; then
67 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
69 grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
70 /etc/httpd/httpd.conf.tmp
71 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
72 if [ -f /var/lock/subsys/httpd ]; then
73 /usr/sbin/apachectl restart 1>&2
79 %defattr(644,root,root,755)
81 %attr(640,root,http) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*
82 %config(noreplace) %verify(not size mtime md5) /etc/httpd/%{name}.conf
85 %{_webchessdir}/images
86 %{_webchessdir}/javascript
87 %{_webchessdir}/chess.inc