]> git.pld-linux.org Git - packages/WebChess.git/blame_incremental - WebChess.spec
- tabs in preamble
[packages/WebChess.git] / WebChess.spec
... / ...
CommitLineData
1Summary: A great persistant online chess game
2Summary(pl.UTF-8): Wspaniała internetowa gra w szachy
3Name: WebChess
4Version: 0.9.0
5Release: 2
6License: GPL
7Group: Applications/WWW
8Source0: http://dl.sourceforge.net/webchess/%{name}_%{version}.zip
9# Source0-md5: e1a0dc90959a4e8475854a6e7fb4f0b9
10Source1: %{name}.conf
11URL: http://webchess.sourceforge.net/
12BuildRequires: rpmbuild(macros) >= 1.268
13BuildRequires: unzip
14Requires: php(mysql)
15Requires: php(pcre)
16Requires: webserver
17Requires: webserver(php)
18BuildArch: noarch
19BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21%define _webchessdir %{_datadir}/%{name}
22%define _sysconfdir /etc/%{name}
23
24%description
25A great persistant online chess game using PHP/MySQL on the backend
26and HTML/JavaScript on the front-end, which includes move validation,
27CHECK checking, pawn promotion and undo. It also has a login system
28which allows multiple simultaneous games.
29
30%description -l pl.UTF-8
31Wspaniała internetowa gra w szachy, używająca PHP/MySQL po stronie
32backendu i HTML/JavaScript po stronie interfejsu użytkownika. Zawiera
33kontrolę ruchów, sprawdzanie szachu, promocję pionów oraz cofanie. Ma
34także system logowania, który pozwala na wiele jednoczesnych gier.
35
36%prep
37%setup -q -c
38
39%install
40rm -rf $RPM_BUILD_ROOT
41install -d $RPM_BUILD_ROOT%{_webchessdir} \
42 $RPM_BUILD_ROOT{%{_sysconfdir},/etc/httpd}
43
44cp -af images javascript *.php *.css chess.inc $RPM_BUILD_ROOT%{_webchessdir}
45rm -f $RPM_BUILD_ROOT%{_webchessdir}/config.php
46
47install config.php $RPM_BUILD_ROOT%{_sysconfdir}
48ln -sf %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_webchessdir}/config.php
49
50install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
51
52%clean
53rm -rf $RPM_BUILD_ROOT
54
55%post
56if [ -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
58elif [ -d /etc/httpd/httpd.conf ]; then
59 ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
60fi
61%service -q httpd reload
62
63%preun
64if [ "$1" = "0" ]; then
65 umask 027
66 if [ -d /etc/httpd/httpd.conf ]; then
67 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
68 else
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
73 fi
74fi
75
76%files
77%defattr(644,root,root,755)
78%dir %{_sysconfdir}
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
81%doc docs/*
82%dir %{_webchessdir}
83%{_webchessdir}/images
84%{_webchessdir}/javascript
85%{_webchessdir}/chess.inc
86%{_webchessdir}/*.php
87%{_webchessdir}/*.css
This page took 0.04113 seconds and 4 git commands to generate.