]> git.pld-linux.org Git - packages/WebChess.git/blob - WebChess.spec
- added URL
[packages/WebChess.git] / WebChess.spec
1 Summary:        A great persistant online chess game
2 Summary(pl):    Wspania³a internetowa gra w szachy
3 Name:           WebChess
4 Version:        0.9.0
5 Release:        1
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
10 Source1:        %{name}.conf
11 URL:            http://webchess.sourceforge.net
12 Requires:       php-mysql
13 Requires:       php-pcre
14 Requires:       webserver
15 BuildArch:      noarch
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %define         _webchessdir    %{_datadir}/%{name}
19 %define         _sysconfdir     /etc/%{name}
20
21 %description
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.
26
27 %description -l pl
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±
31
32 %prep
33 %setup -q -c %{name}-%{version}
34
35 %install
36 rm -rf $RPM_BUILD_ROOT
37 install -d $RPM_BUILD_ROOT%{_webchessdir} \
38           $RPM_BUILD_ROOT{%{_sysconfdir},/etc/httpd}
39
40 cp -af images javascript *.php *.css chess.inc    $RPM_BUILD_ROOT%{_webchessdir}
41 rm -f $RPM_BUILD_ROOT%{_webchessdir}/config.php
42
43 install config.php $RPM_BUILD_ROOT%{_sysconfdir}
44 ln -sf %{_sysconfdir}/config.php $RPM_BUILD_ROOT%{_webchessdir}/config.php
45
46 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
47
48 %clean
49 rm -rf $RPM_BUILD_ROOT
50
51 %post
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
56 fi
57 if [ -f /var/lock/subsys/httpd ]; then
58         /usr/sbin/apachectl restart 1>&2
59 fi
60
61 %preun
62 if [ "$1" = "0" ]; then
63         umask 027
64         if [ -d /etc/httpd/httpd.conf ]; then
65             rm -f /etc/httpd/httpd.conf/99_%{name}.conf
66         else
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
72                 fi
73         fi
74 fi
75
76
77 %files
78 %defattr(644,root,root,755)
79 %dir %{_sysconfdir}
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
82 %doc docs/*
83 %dir %{_webchessdir}
84 %{_webchessdir}/images/
85 %{_webchessdir}/javascript/
86 %{_webchessdir}/chess.inc
87 %{_webchessdir}/*.php
88 %{_webchessdir}/*.css
This page took 0.092053 seconds and 4 git commands to generate.