2 # - lighttpd integration possible <http://wiki.lighttpd.net/33.html>.
5 %define _snap 2005-02-20
8 %define _source http://snaps.cowiki.org/%{name}-%{version}-dev-%{_snap}.tar.gz
10 %define _source http://cowiki.org/download/%{name}-%{version}.tar.gz
14 Summary: Web collaboration tool
17 Release: %{?_snap:0.%(echo %{_snap} | tr -d -).}%{_rel}
20 Group: Applications/WWW
22 # Source0-md5: 6351667cdfbf3b6e8937af855a4414ba
23 Patch0: %{name}-FHS.patch
24 URL: http://cowiki.org/
25 BuildRequires: rpmbuild(macros) >= 1.177
26 Requires: php >= 5.0.2
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 %define _appdir %{_datadir}/%{name}
32 %define _sysconfdir /etc/%{name}
33 %define _apache1dir /etc/apache
34 %define _apache2dir /etc/httpd
37 coWiki is a sophisticated but easy to use web collaboration tool that
38 helps you and your co-workers to create and organize web documents,
39 weblogs and knowledgebases or any other document structures directly
40 in their HTML browser. You may evolve ideas and gain a concomitant XML
41 documentation of your brainstorming without having to concentrate on
42 complicated structural syntaxes.
45 coWiki to wyszukane, ale ³atwe w u¿yciu narzêdzie do pracy zespo³owej
46 przez WWW pomagaj±ce wspó³pracownikom tworzyæ i organizowaæ dokumenty
47 WWW, weblogi, bazy wiedzy lub dowolne inne struktury dokumentów
48 bezpo¶rednio w przegl±darce HTML. Mo¿na rozwijaæ idee i otrzymywaæ
49 towarzysz±c± dokumentacjê XML burzy mózgów bez potrzeby koncentrowania
50 siê na skomplikowanej sk³adni strukturalnej.
53 %setup -q %{?_snap:-n %{name}-%{version}-dev-%{_snap}}
56 mv includes/cowiki/core.conf-dist .
57 rm -f {htdocs,includes/cowiki}/.cvsignore
61 rm -rf $RPM_BUILD_ROOT
62 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir},/var/lib/%{name}}
64 cp -a htdocs includes $RPM_BUILD_ROOT%{_appdir}
67 s,CHECK_INTERVAL = .*,CHECK_INTERVAL = "-1",
68 s,RETURN_PATH = .*,RETURN_PATH = "your.bounce.email@localhost",
69 s,ABUSE_PATH = .*,ABUSE_PATH = "abuse@localhost",
70 s,ROOT_PASSWD = .*,ROOT_PASSWD = "XXX",
71 s,LOOKUP_DNS = .*,LOOKUP_DNS = off,
72 s,TEMP = .*,TEMP = "/var/lib/%{name}/",
74 ' core.conf-dist > $RPM_BUILD_ROOT%{_sysconfdir}/core.conf
75 echo -e '\n; vim: ft=dosini' >> $RPM_BUILD_ROOT%{_sysconfdir}/core.conf
77 # unfortunately cowiki works only as vhost root
78 cat <<EOF >> $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
79 <Directory /usr/share/cowiki/htdocs>
85 DocumentRoot /usr/share/cowiki/htdocs
88 sed -ne '/BEGIN/,/END/p' .htaccess >> $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
89 cat <<EOF >> $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
94 rm -rf $RPM_BUILD_ROOT
98 if [ -d %{_apache1dir}/conf.d ]; then
99 ln -sf %{_sysconfdir}/apache.conf %{_apache1dir}/conf.d/99_%{name}.conf
100 if [ -f /var/lock/subsys/apache ]; then
101 /etc/rc.d/init.d/apache restart 1>&2
105 if [ -d %{_apache2dir}/httpd.conf ]; then
106 ln -sf %{_sysconfdir}/apache.conf %{_apache2dir}/httpd.conf/99_%{name}.conf
107 if [ -f /var/lock/subsys/httpd ]; then
108 /etc/rc.d/init.d/httpd restart 1>&2
112 if [ "$1" = 1 ]; then
113 %banner %{name} -e <<EOF
114 Install the database using the appropriate "misc/database/*.sql" schema.
115 You must setup authorization and root password in:
116 - %{_sysconfdir}/core.conf
122 if [ "$1" = "0" ]; then
124 if [ -f %{_apache1dir}/apache.conf ]; then
125 rm -f %{_apache1dir}/conf.d/99_%{name}.conf
126 if [ -f /var/lock/subsys/apache ]; then
127 /etc/rc.d/init.d/apache restart 1>&2
131 if [ -d %{_apache2dir}/httpd.conf ]; then
132 rm -f %{_apache2dir}/httpd.conf/99_%{name}.conf
133 if [ -f /var/lock/subsys/httpd ]; then
134 /etc/rc.d/init.d/httpd restart 1>&2
139 # FIXME could suffer too many arguments error
140 rm -f /var/lib/%{name}/*
144 %defattr(644,root,root,755)
145 %doc ChangeLog INSTALL* NEWS
146 %doc README.IDIOM README.PLUGIN SKEL.PLUGIN
149 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
150 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/core.conf
152 %dir %attr(770,root,http) /var/lib/%{name}