]> git.pld-linux.org Git - packages/cowiki.git/blob - cowiki.spec
8ae0608bb565a7344c30c943495fbd7fd4737383
[packages/cowiki.git] / cowiki.spec
1 # TODO
2 #  - lighttpd integration possible <http://wiki.lighttpd.net/33.html>.
3
4 # snapshot: DATE
5 #define _snap 2005-02-20
6
7 %if 0%{?_snap}
8 %define _source http://snaps.cowiki.org/%{name}-%{version}-dev-%{_snap}.tar.gz
9 %else
10 %define _source http://www.cowiki.org/download/%{name}-%{version}.tar.gz
11 %endif
12 %define _rel 2
13
14 Summary:        Web collaboration tool
15 Summary(pl):    Narzêdzie do wspó³pracy i wspó³tworzenia w sieci
16 Name:           cowiki
17 Version:        0.3.4
18 Release:        %{?_snap:0.%(echo %{_snap} | tr -d -).}%{_rel}
19 Epoch:          0
20 License:        GPL
21 Group:          Applications/WWW
22 Source0:        %{_source}
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
28 Requires:       php-mysql
29 Requires:       apache(mod_auth)
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %define         _appdir %{_datadir}/%{name}
34 %define         _sysconfdir     /etc/%{name}
35
36 %description
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.
43
44 %description -l pl
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.
51
52 %prep
53 %setup -q %{?_snap:-n %{name}-%{version}-dev-%{_snap}}
54 %patch0 -p1
55
56 mv includes/cowiki/core.conf-dist .
57 rm -f {htdocs,includes/cowiki}/.cvsignore
58 mv htdocs/.htaccess .
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62 install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir},/var/lib/%{name}}
63
64 cp -a htdocs includes $RPM_BUILD_ROOT%{_appdir}
65
66 sed -e '
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}/",
73
74 ' core.conf-dist > $RPM_BUILD_ROOT%{_sysconfdir}/core.conf
75 echo -e '\n; vim: ft=dosini' >> $RPM_BUILD_ROOT%{_sysconfdir}/core.conf
76
77 # unfortunately cowiki works only as vhost root
78 cat <<EOF >> $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
79 <Directory /usr/share/cowiki/htdocs>
80     Allow from all
81 </Directory>
82
83 <VirtualHost *>
84         ServerName cowiki
85         DocumentRoot /usr/share/cowiki/htdocs
86
87 EOF
88 sed -ne '/BEGIN/,/END/p' .htaccess >> $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
89 cat <<EOF >> $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
90 </VirtualHost>
91 EOF
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96 %triggerin -- apache1 >= 1.3.33-2
97 %apache_config_install -v 1 -c %{_sysconfdir}/apache.conf
98
99 %triggerun -- apache1 >= 1.3.33-2
100 %apache_config_uninstall -v 1
101
102 %triggerin -- apache >= 2.0.0
103 %apache_config_install -v 2 -c %{_sysconfdir}/apache.conf
104
105 %triggerun -- apache >= 2.0.0
106 %apache_config_uninstall -v 2
107
108 %post
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
114
115 EOF
116 fi
117
118 %preun
119 if [ "$1" = "0" ]; then
120         # nuke cache
121         # FIXME could suffer too many arguments error
122         rm -f /var/lib/%{name}/*
123 fi
124
125 %files
126 %defattr(644,root,root,755)
127 %doc ChangeLog INSTALL* NEWS 
128 %doc README.IDIOM README.PLUGIN SKEL.PLUGIN
129 %doc misc/database
130 %dir %{_sysconfdir}
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
133 %{_appdir}
134 %dir %attr(770,root,http) /var/lib/%{name}
This page took 0.077439 seconds and 3 git commands to generate.