+%define subver 2017-02-18
+%define ver %(echo %{subver} | tr -d -)
%define plugin odt
-Summary: DokuWiki odt (Open Document Text) Export Plugin
+%define php_min_version 5.5
+Summary: OpenOffice.org/LibreOffice.org Export
Summary(pl.UTF-8): Wtyczka do eksportowania plików odt (Open Document Text)
Name: dokuwiki-plugin-%{plugin}
-Version: 20110616
-Release: 2
+Version: %{ver}
+Release: 1
License: GPL v2
Group: Applications/WWW
-#Source0: http://aurelien.bompard.org/projects/files/dokuwiki-odt/dokuwiki-odt-%{version}.zip
-Source0: http://gitorious.org/dokuwiki-odt/dokuwiki-odt/archive-tarball/master#/%{name}-%{version}.tgz
-# Source0-md5: a30fe453e3036014c82e5b5e9a7c47b0
-Patch0: dokuwiki-ziplib.patch
-Patch1: geshi.patch
-URL: http://www.dokuwiki.org/plugin:odt
-Requires: dokuwiki >= 20070626
-Requires: php(core) >= 5.0
+Source0: https://github.com/LarsGit223/dokuwiki-plugin-odt/archive/%{subver}/%{name}-%{ver}.tar.gz
+# Source0-md5: 6768d4d2e55c676bc46ef877abaeeb34
+URL: https://www.dokuwiki.org/plugin:odt
+Requires: dokuwiki >= 20150810
+Requires: php(core) >= %{php_min_version}
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
This plugin allows you to export a page to the OpenDocument format
-used by Open Office and other word processors. This is especially
-useful when you need to give a single page to a customer
+used by OpenOffice.org, LibreOffice.org and other word processors.
-Hint: Open Office can also export to PDF.
+This is especially useful when you need to print or to give a single
+page to a customer.
+
+Hint: OpenOffice.org can also export to PDF.
%description -l pl.UTF-8
Ta wtyczka pozwala na eksportowanie strony do formatu OpenDocument,
Podpowiedź: Open Office pozwala także na eksportowanie do PDF.
%prep
-%setup -qc
-mv dokuwiki-odt-dokuwiki-odt/* .
-%patch0 -p1
-%patch1 -p1
+%setup -q -n %{name}-%{subver}
-version=$( awk '/^date/{print $2}' info.txt)
+%build
+version=$(awk '/^date/{print $2}' plugin.info.txt)
if [ "$(echo "$version" | tr -d -)" != %{version} ]; then
: %%{version} mismatch
-# exit 1
+ exit 1
fi
-rm -f ZipLib.class.php
-
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{plugindir}
-cp -a conf lang *.php *.png *.xml info.txt $RPM_BUILD_ROOT%{plugindir}
-rm -f $RPM_BUILD_ROOT%{plugindir}/{ChangeLog,.gitignore}
+cp -a . $RPM_BUILD_ROOT%{plugindir}
+%{__rm} $RPM_BUILD_ROOT%{plugindir}/deleted.files
+%{__rm} $RPM_BUILD_ROOT%{plugindir}/phpdoc.dist.xml
+%{__rm} $RPM_BUILD_ROOT%{plugindir}/{ChangeLog,README}.txt
%find_lang %{name}.lang
%doc ChangeLog.txt README.txt
%defattr(644,root,root,755)
%dir %{plugindir}
-%{plugindir}/*.txt
+%{plugindir}/*.css
+%{plugindir}/*.php
%{plugindir}/*.png
+%{plugindir}/*.txt
%{plugindir}/*.xml
-%{plugindir}/*.php
+%{plugindir}/ODT
+%{plugindir}/action
%{plugindir}/conf
+%{plugindir}/helper
+%{plugindir}/renderer
+++ /dev/null
---- odt/renderer.php~ 2009-07-02 21:19:54.000000000 +0300
-+++ odt/renderer.php 2009-08-29 23:15:39.131348492 +0300
-@@ -10,17 +10,7 @@
- if(!defined('DOKU_INC')) die();
-
- require_once DOKU_INC.'inc/parser/renderer.php';
--
--// ZipLib.class.php
--$dw_version = preg_replace('/[^\d]/', '', getversion());
--if (version_compare($dw_version, "20070626") and
-- version_compare(PHP_VERSION,'5.0.0','>')) {
-- // If strictly newer than 2007-06-26 and use PHP5, fixes to ZipLib are
-- // included in Dokuwiki's ZipLib
-- require_once DOKU_INC.'inc/ZipLib.class.php';
--} else { // for DW up to 2007-06-26, we need the patched version
-- require_once 'ZipLib.class.php';
--}
-+require_once DOKU_INC.'inc/ZipLib.class.php';
-
- /**
- * The Renderer
+++ /dev/null
---- dokuwiki-plugin-odt-20100812/renderer.php~ 2010-09-15 12:18:41.000000000 +0300
-+++ dokuwiki-plugin-odt-20100812/renderer.php 2010-09-15 12:21:24.009399926 +0300
-@@ -892,8 +892,8 @@
- }
-
- // from inc/parserutils.php:p_xhtml_cached_geshi()
-- require_once(DOKU_INC . 'inc/geshi.php');
-- $geshi = new GeSHi($text, $language, DOKU_INC . 'inc/geshi');
-+ require_once '/usr/share/php/geshi.php';
-+ $geshi = new GeSHi($text, $language);
- $geshi->set_encoding('utf-8');
- // $geshi->enable_classes(); DO NOT WANT !
- $geshi->set_header_type(GESHI_HEADER_PRE);