X-Git-Url: http://git.pld-linux.org/?p=packages%2Fdokuwiki-plugin-odt.git;a=blobdiff_plain;f=dokuwiki-plugin-odt.spec;h=e6c1b6b64fc4917e81ac31f5ece195a39a5e2cb9;hp=f68d06f94acd459c675ce372a5e593568391a5d2;hb=HEAD;hpb=83d9170fc9b301e4e05ba2c368aa93c9b9ceda99 diff --git a/dokuwiki-plugin-odt.spec b/dokuwiki-plugin-odt.spec index f68d06f..e6c1b6b 100644 --- a/dokuwiki-plugin-odt.spec +++ b/dokuwiki-plugin-odt.spec @@ -1,58 +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: 20080507 +Version: %{ver} Release: 1 License: GPL v2 Group: Applications/WWW -Source0: http://gauret.free.fr/fichiers/dokuwiki/dokuwiki-odt-%{version}.tgz -# Source0-md5: -Source1: dokuwiki-find-lang.sh -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 -w 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} +%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 -f $RPM_BUILD_ROOT%{plugindir}/{ChangeLog,.gitignore} +%{__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 -%doc ChangeLog +%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 -%dir %{plugindir}/conf -%{plugindir}/conf/*.php +%{plugindir}/ODT +%{plugindir}/action +%{plugindir}/conf +%{plugindir}/helper +%{plugindir}/renderer