# TODO # - lighttpd integration possible . # - theoretically mysql,mysqli,pgsql,sqlite connectors are possible. %define _snap 2006-05-08 %define _rel 0.17 Summary: Web collaboration tool Summary(pl.UTF-8): Narzędzie do współpracy i współtworzenia w sieci Name: cowiki Version: 0.4.0 Release: %{?_snap:1.%(echo %{_snap} | tr -d -).}%{_rel} License: GPL Group: Applications/WWW Source0: http://snaps.cowiki.org/%{name}-%{version}-interim-%{_snap}.tar.gz # Source0-md5: f2843189fc24c854414a3e23a4b9ac95 Source1: %{name}.conf Patch0: %{name}-FHS.patch Patch1: %{name}-config.patch Patch2: %{name}-https.patch Patch3: %{name}-includepath.patch Patch4: %{name}-tz.patch Patch5: %{name}-webapps.patch URL: http://www.cowiki.org/ BuildRequires: rpmbuild(macros) >= 1.268 Requires: apache(mod_dir) Requires: diffutils Requires: php(dom) Requires: php(mysqli) Requires: php(pcre) Requires: webapps Requires: webserver(php) >= 5.0.2 BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _webapps /etc/webapps %define _webapp %{name} %define _sysconfdir %{_webapps}/%{_webapp} %define _appdir %{_datadir}/%{_webapp} %description coWiki is a sophisticated but easy to use web collaboration tool that helps you and your co-workers to create and organize web documents, weblogs and knowledgebases or any other document structures directly in their HTML browser. You may evolve ideas and gain a concomitant XML documentation of your brainstorming without having to concentrate on complicated structural syntaxes. %description -l pl.UTF-8 coWiki to wyszukane, ale łatwe w użyciu narzędzie do pracy zespołowej przez WWW pomagające współpracownikom tworzyć i organizować dokumenty WWW, weblogi, bazy wiedzy lub dowolne inne struktury dokumentów bezpośrednio w przeglądarce HTML. Można rozwijać idee i otrzymywać towarzyszącą dokumentację XML burzy mózgów bez potrzeby koncentrowania się na skomplikowanej składni strukturalnej. %package setup Summary: coWiki setup package Summary(pl.UTF-8): Pakiet do wstępnej konfiguracji coWiki Group: Applications/WWW Requires: %{name} = %{version}-%{release} %description setup Install this package to configure initial coWiki installation. You should uninstall this package when you're done, as it considered insecure to keep the setup files in place. %description setup -l pl.UTF-8 Ten pakiet należy zainstalować w celu wstępnej konfiguracji coWiki po pierwszej instalacji. Potem należy go odinstalować, jako że pozostawienie plików instalacyjnych mogłoby być niebezpieczne. %prep %setup -q %{?_snap:-n %{name}-%{version}-interim-%{_snap}} %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 mv includes/cowiki/core.conf-dist . rm {htdocs,includes/cowiki}/.cvsignore mv htdocs/.htaccess . rm htdocs/setup/LICENSE # GPL rm -f htdocs/include.path cat <<'EOF' > misc/database/mysql-grant.sql # this schema will grant MySQL database access GRANT SELECT, INSERT, UPDATE, DELETE ON cowiki.* TO 'cowiki'@'localhost' IDENTIFIED BY 'password '; EOF cat <<'EOF' > php.ini [PHP] ; Whether to allow the treatment of URLs (like http:// or ftp://) as files. allow_url_fopen = On EOF %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_appdir},%{_sysconfdir},/var/cache/%{name}} install -d $RPM_BUILD_ROOT/etc/php/apache{,2handler}.d cp -a htdocs includes misc $RPM_BUILD_ROOT%{_appdir} install core.conf-dist $RPM_BUILD_ROOT%{_sysconfdir}/core.conf install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf cp -a php.ini $RPM_BUILD_ROOT/etc/php/apache.d/%{name}.ini cp -a php.ini $RPM_BUILD_ROOT/etc/php/apache2handler.d/%{name}.ini # for setup install LICENSE $RPM_BUILD_ROOT%{_appdir}/htdocs/setup install core.conf-dist $RPM_BUILD_ROOT%{_appdir}/includes/cowiki/core.conf-dist touch $RPM_BUILD_ROOT%{_appdir}/htdocs/install.seal %clean rm -rf $RPM_BUILD_ROOT %post if [ "$1" = 1 ]; then %banner %{name} -e <