3 Summary: Easy-to-install, and easy-to-use multi-room PHP/DB chat
4 Summary(pl.UTF-8): Prosty w instalacji i użyciu wielopokojowy chat oparty na PHP/DB
9 Group: Applications/WWW
10 Source0: http://dl.sourceforge.net/phpmychat/%{name}-%{version}.zip
11 # Source0-md5: 86b961cba624a5d3ea5bebf52a90fec5
13 URL: http://sourceforge.net/projects/phpmychat/
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 %define _mychatdir %{_datadir}/%{name}
22 %define _sysconfdir /etc/%{name}
25 phpMyChat is an easy-to-install, easy-to-use multi-room PHP/DB chat.
26 It is currently available for MySQL, PostgreSQL, and ODBC, and the
27 work on Oracle is in progress. It supports IRC-like commands,
28 moderators, and is available with 37 languages.
30 %description -l pl.UTF-8
31 phpMyChat jest to prosty w instalacji i użyciu wielopokojowy chat
32 oparty na PHP/DB. Aktualnie dostępny dla MySQL, PostgreSQL i ODBC, a w
33 trakcie są już prace nad Oracle. Chat obsługiwany jest przed polecenia
34 podobne do tych, które znamy z IRCa, dostępne są również opcje
35 moderatorskie, a wszystko to posiada wsparcie dla 37 języków.
41 rm -rf $RPM_BUILD_ROOT
42 install -d $RPM_BUILD_ROOT%{_mychatdir} \
43 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \
44 $RPM_BUILD_ROOT{%{_sysconfdir},/etc/httpd}
46 install chat_activity.php3 phpMyChat.php3 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
48 cp -af chat/* $RPM_BUILD_ROOT%{_mychatdir}
49 rm -f $RPM_BUILD_ROOT%{_mychatdir}/config/*
51 cp chat/config/* $RPM_BUILD_ROOT%{_sysconfdir}
52 ln -sf %{_sysconfdir}/admin.css.php3 $RPM_BUILD_ROOT%{_mychatdir}/config/admin.css.php3
53 ln -sf %{_sysconfdir}/config.lib.php3 $RPM_BUILD_ROOT%{_mychatdir}/config/config.lib.php3
54 ln -sf %{_sysconfdir}/start_page.css.php3 $RPM_BUILD_ROOT%{_mychatdir}/config/start_page.css.php3
55 ln -sf %{_sysconfdir}/style.css.php3 $RPM_BUILD_ROOT%{_mychatdir}/config/style.css.php3
57 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
60 rm -rf $RPM_BUILD_ROOT
63 if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*%{name}.conf" /etc/httpd/httpd.conf; then
64 echo "Include /etc/httpd/%{name}.conf" >> /etc/httpd/httpd.conf
65 elif [ -d /etc/httpd/httpd.conf ]; then
66 ln -sf /etc/httpd/%{name}.conf /etc/httpd/httpd.conf/99_%{name}.conf
68 if [ -f /var/lock/subsys/httpd ]; then
69 /usr/sbin/apachectl restart 1>&2
73 if [ "$1" = "0" ]; then
75 if [ -d /etc/httpd/httpd.conf ]; then
76 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
78 grep -v "^Include.*%{name}.conf" /etc/httpd/httpd.conf > \
79 /etc/httpd/httpd.conf.tmp
80 mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
81 if [ -f /var/lock/subsys/httpd ]; then
82 /usr/sbin/apachectl restart 1>&2
88 %defattr(644,root,root,755)
89 %doc docs/* readme.txt
90 %dir %{_examplesdir}/%{name}-%{version}
91 %{_examplesdir}/%{name}-%{version}/chat_activity.php3
93 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
94 %config(noreplace) %verify(not md5 mtime size) /etc/httpd/%{name}.conf
101 %{_mychatdir}/localization
103 %{_mychatdir}/favicon*