]> git.pld-linux.org Git - packages/dokuwiki-plugin-odt.git/blobdiff - dokuwiki-plugin-odt.spec
up to 2017-02-18; requires 2015-08-10 “Detritus”
[packages/dokuwiki-plugin-odt.git] / dokuwiki-plugin-odt.spec
index f774fdc228ac9954f02101ee2c218cf25302d5c4..e6c1b6b64fc4917e81ac31f5ece195a39a5e2cb9 100644 (file)
@@ -1,56 +1,84 @@
+%define                subver  2017-02-18
+%define                ver             %(echo %{subver} | tr -d -)
 %define                plugin          odt
-Summary:       DokuWiki odt (Open Document Text) Export Plugin
-Summary(pl-UTF8):      Wtyczka do eksportowania plików odt (Open Document Text)
+%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:       20080219
+Version:       %{ver}
 Release:       1
 License:       GPL v2
 Group:         Applications/WWW
-Source0:       http://wiki.splitbrain.org/_media/plugin:odt-plugin-2008-02-19.tgz
-# Source0-md5: f79363c82281978e274442164581d91a
-Source1:       dokuwiki-find-lang.sh
-Patch0:                http://gauret.free.fr/fichiers/dokuwiki/dokuwiki-odt-20070626.patch
-URL:           http://wiki.splitbrain.org/plugin:odt
-Requires:      dokuwiki >= 20070626
+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)
 
+%define                dokuconf        /etc/webapps/dokuwiki
 %define                dokudir         /usr/share/dokuwiki
 %define                plugindir       %{dokudir}/lib/plugins/%{plugin}
+%define                find_lang       %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot}
 
 %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.
 
-%description -l pl-UTF8
+Hint: OpenOffice.org can also export to PDF.
+
+%description -l pl.UTF-8
 Ta wtyczka pozwala na eksportowanie strony do formatu OpenDocument,
-używanego przez Open Office i inne edytory tekstu. Przydatna jest
-sytuacji w której musisz dać pojedyńczą stronę klientowi.
+używanego przez Open Office i inne edytory tekstu. Przydatna jest w
+sytuacji w której musisz dać pojedyńczą stronę klientowi.
 
 Podpowiedź: Open Office pozwala także na eksportowanie do PDF.
 
 %prep
-%setup -q -n %{plugin}
-%patch0 -p1
+%setup -q -n %{name}-%{subver}
+
+%build
+version=$(awk '/^date/{print $2}' plugin.info.txt)
+if [ "$(echo "$version" | tr -d -)" != %{version} ]; then
+       : %%{version} mismatch
+       exit 1
+fi
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{plugindir}
 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 locales
-sh %{SOURCE1} %{name}.lang
+%find_lang %{name}.lang
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+# force css cache refresh
+if [ -f %{dokuconf}/local.php ]; then
+       touch %{dokuconf}/local.php
+fi
+
 %files -f %{name}.lang
 %defattr(644,root,root,755)
+%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
This page took 0.111023 seconds and 4 git commands to generate.