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://www.cowiki.org/download/%{name}-%{version}.tar.gz
14 Summary: Web collaboration tool
15 Summary(pl): Narzêdzie do wspó³pracy i wspó³tworzenia w sieci
18 Release: %{?_snap:0.%(echo %{_snap} | tr -d -).}%{_rel}
21 Group: Applications/WWW
23 # Source0-md5: 33d0b6506e39846666434cc3ba2f95bd
24 Patch0: %{name}-FHS.patch
25 URL: http://cowiki.org/
26 BuildRequires: rpmbuild(macros) >= 1.226
27 Requires: php >= 4:5.0.2
29 Requires: apache(mod_auth)
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 %define _appdir %{_datadir}/%{name}
34 %define _sysconfdir /etc/%{name}
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
96 %triggerin -- apache1 >= 1.3.33-2
97 %apache_config_install -v 1 -c %{_sysconfdir}/apache.conf
99 %triggerun -- apache1 >= 1.3.33-2
100 %apache_config_uninstall -v 1
102 %triggerin -- apache >= 2.0.0
103 %apache_config_install -v 2 -c %{_sysconfdir}/apache.conf
105 %triggerun -- apache >= 2.0.0
106 %apache_config_uninstall -v 2
109 if [ "$1" = 1 ]; then
110 %banner %{name} -e <<EOF
111 Install the database using the appropriate "misc/database/*.sql" schema.
112 You must setup authorization and root password in:
113 - %{_sysconfdir}/core.conf
119 if [ "$1" = "0" ]; then
121 # FIXME could suffer too many arguments error
122 rm -f /var/lib/%{name}/*
126 %defattr(644,root,root,755)
127 %doc ChangeLog INSTALL* NEWS
128 %doc README.IDIOM README.PLUGIN SKEL.PLUGIN
131 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
132 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/core.conf
134 %dir %attr(770,root,http) /var/lib/%{name}