LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File dokuwiki.spec of Package dokuwiki (Project home:napobear)

#
# spec file for package DokuWiki
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Name: 		dokuwiki
Version: 	2015.08.10a
%define my_version 2015-08-10a
Release: 	1
Summary: 	A Wiki written in PHP to work without a database
Summary(de): 	Ein in PHP geschriebenes Wiki, das keine Datenbank benutzt
License: 	GPL-2.0
Group: 		Productivity/Publishing/Other
Vendor: 	Andreas Gohr <andi@splitbrain.org>
URL: 		http://www.dokuwiki.org/
PreReq: 	coreutils
BuildArch: 	noarch
Prefix: 	/usr/share
Prefix: 	/etc
Source: 	http://download.dokuwiki.org/src/%{name}/%{name}-%{my_version}.tgz
Source1: 	DokuWiki.conf
##Patch0: 	dokuwiki-suse-shebang.patch
Buildroot: 	%{_tmppath}/%{name}-%{version}-buildroot

%if "%{_vendor}" == "suse"
Requires: apache2-mod_php5
Requires: php5 >= 5.1.2
PreReq: apache2
BuildRequires:        fdupes
BuildRequires:        apache2-devel
%define apache        apache2
%define apxs          %{_sbindir}/apxs2
%else
Requires: php >= 5.1.2
PreReq: httpd
BuildRequires:        httpd-devel
%define apache        httpd
%define apxs          %{_sbindir}/apxs2
%endif

%define apache_libexecdir %(%{apxs} -q LIBEXECDIR)
%define apache_sysconfdir %(%{apxs} -q SYSCONFDIR)


# %%packager

%description
DokuWiki is a standards compliant, simple to use Wiki, mainly aimed at creating 
documentation of any kind. It is targeted at developer teams, workgroups and small 
companies. It has a simple but powerful syntax which makes sure the datafiles 
remain readable outside the Wiki and eases the creation of structured texts. 
All data is stored in plain text files - no database is required.

Read the DokuWiki Manual to unleash the full power of DokuWiki.

Author:
-------
    Andreas Gohr

%description -l de
DokuWiki ist ein einfach zu benutzendes Wiki, mit dem vor allem Dokumentation jeder Art
erstellt werden soll, und dessen Ausgabeformat den Standards entspricht. Zielguppe sind 
Entwicklerteams, Arbeitsgruppen und kleine Firmen aller Art. DokuWiki hat eine einfache, 
aber m├Ąchtige Syntax und erleichtert das Erstellen strukturierter Texte. Alle Daten 
werden in reinen Textdateien abgelegt - eine Datenbank ist nicht erforderlich.

Lies das Handbuch von DokuWiki, um seine geballte Kraft freizusetzen.

Autor:
--------
    Andreas Gohr

%prep
%setup -q -n %{name}-%{my_version}
##%%if "%%{_vendor}" == "suse"
##%%patch0 -p1
##%%endif

%build

%install
mkdir -p %{buildroot}%{apache_sysconfdir}/conf.d/
mkdir -p %{buildroot}%{_datadir}/dokuwiki/bin
mkdir -p %{buildroot}%{_datadir}/dokuwiki/conf
mkdir -p %{buildroot}%{_datadir}/dokuwiki/data
mkdir -p %{buildroot}%{_datadir}/dokuwiki/inc
mkdir -p %{buildroot}%{_datadir}/dokuwiki/lib
mkdir -p %{buildroot}%{_datadir}/dokuwiki/vendor

cp %{SOURCE1} %{buildroot}%{apache_sysconfdir}/conf.d/%{name}.conf
cp -a *.php %{buildroot}%{_datadir}/dokuwiki/
cp -a bin/*.php %{buildroot}%{_datadir}/dokuwiki/bin/
cp -ar data/* %{buildroot}%{_datadir}/dokuwiki/data/
cp -ar inc/* %{buildroot}%{_datadir}/dokuwiki/inc/
cp -ar lib/* %{buildroot}%{_datadir}/dokuwiki/lib/
cp -ar vendor/* %{buildroot}%{_datadir}/dokuwiki/vendor/
cp -a conf/* %{buildroot}%{_datadir}/dokuwiki/conf/
#rm %%{buildroot}%%{_datadir}/dokuwiki/inc/lang/.htaccess
chmod 754 %{buildroot}%{_datadir}/dokuwiki/bin/dwpage.php
chmod 754 %{buildroot}%{_datadir}/dokuwiki/bin/indexer.php
chmod 754 %{buildroot}%{_datadir}/dokuwiki/bin/wantedpages.php
%if "%{_vendor}" == "suse"
%fdupes %{buildroot}
%endif

%clean
[ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot}

%files
%if "%{_vendor}" == "suse"
%defattr(-, wwwrun, www)
%else
%defattr(-, apache, apache)
%endif
%doc README VERSION COPYING .htaccess.dist
%{_datadir}/dokuwiki
%config %{apache_sysconfdir}/conf.d/%{name}.conf

%post
[ -L /etc/DokuWiki ] && rm -rf /etc/DokuWiki
[ -L /etc/DokuWiki ] || ln -s /usr/share/dokuwiki/conf /etc/DokuWiki

%changelog