1 Summary: A great persistant online chess game
2 Summary(pl.UTF-8): 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/
12 BuildRequires: rpmbuild(macros) >= 1.268
17 Requires: webserver(php)
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 %define _webchessdir %{_datadir}/%{name}
22 %define _sysconfdir /etc/%{name}
25 A great persistant online chess game using PHP/MySQL on the backend
26 and HTML/JavaScript on the front-end, which includes move validation,
27 CHECK checking, pawn promotion and undo. It also has a login system
28 which allows multiple simultaneous games.
30 %description -l pl.UTF-8
31 Wspaniała internetowa gra w szachy, używająca PHP/MySQL po stronie
32 backendu i HTML/JavaScript po stronie interfejsu użytkownika. Zawiera
33 kontrolę ruchów, sprawdzanie szachu, promocję pionów oraz cofanie. Ma
34 także system logowania, który pozwala na wiele jednoczesnych gier.
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT%{_webchessdir} \
42 $RPM_BUILD_ROOT{%{_sysconfdir},/etc/httpd}
44 cp -af images javascript *.php *.css chess.inc $RPM_BUILD_ROOT%{_webchessdir}
45 rm -f $RPM_BUILD_ROOT%{_webchessdir}/config.php
47 install config.php $RPM_BUILD_ROOT%{_sysconfdir}
48 ln -sf %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_webchessdir}/config.php
50 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
53 rm -rf $RPM_BUILD_ROOT
56 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
57 echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
58 elif [ -d /etc/httpd/httpd.conf ]; then
59 ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
61 %service -q httpd reload
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 %service -q httpd reload
77 %defattr(644,root,root,755)
79 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
80 %config(noreplace) %verify(not md5 mtime size) /etc/httpd/%{name}.conf
83 %{_webchessdir}/images
84 %{_webchessdir}/javascript
85 %{_webchessdir}/chess.inc