]> git.pld-linux.org Git - SPECS.git/blob - phpMyChat.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / phpMyChat.spec
1 # TODO
2 # - webapps
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
5 Name:           phpMyChat
6 Version:        0.14.5
7 Release:        0.1
8 License:        GPL
9 Group:          Applications/WWW
10 Source0:        http://dl.sourceforge.net/phpmychat/%{name}-%{version}.zip
11 # Source0-md5:  86b961cba624a5d3ea5bebf52a90fec5
12 Source1:        %{name}.conf
13 URL:            http://sourceforge.net/projects/phpmychat/
14 BuildRequires:  unzip
15 Requires:       php(mysql)
16 Requires:       php(pcre)
17 Requires:       webserver
18 BuildArch:      noarch
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %define         _mychatdir      %{_datadir}/%{name}
22 %define         _sysconfdir     /etc/%{name}
23
24 %description
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.
29
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.
36
37 %prep
38 %setup -q -c
39
40 %install
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}
45
46 install chat_activity.php3 phpMyChat.php3 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
47
48 cp -af chat/* $RPM_BUILD_ROOT%{_mychatdir}
49 rm -f $RPM_BUILD_ROOT%{_mychatdir}/config/*
50
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
56
57 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/%{name}.conf
58
59 %clean
60 rm -rf $RPM_BUILD_ROOT
61
62 %post
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
67 fi
68 if [ -f /var/lock/subsys/httpd ]; then
69         /usr/sbin/apachectl restart 1>&2
70 fi
71
72 %preun
73 if [ "$1" = "0" ]; then
74         umask 027
75         if [ -d /etc/httpd/httpd.conf ]; then
76                 rm -f /etc/httpd/httpd.conf/99_%{name}.conf
77         else
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
83                 fi
84         fi
85 fi
86
87 %files
88 %defattr(644,root,root,755)
89 %doc docs/* readme.txt
90 %dir %{_examplesdir}/%{name}-%{version}
91 %{_examplesdir}/%{name}-%{version}/chat_activity.php3
92 %dir %{_sysconfdir}
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
95 %dir %{_mychatdir}
96 %{_mychatdir}/admin
97 %{_mychatdir}/config
98 %{_mychatdir}/images
99 %{_mychatdir}/install
100 %{_mychatdir}/lib
101 %{_mychatdir}/localization
102 %{_mychatdir}/*.php3
103 %{_mychatdir}/favicon*
104 %{_mychatdir}/link*
This page took 0.0431 seconds and 3 git commands to generate.