+++ /dev/null
-#!/bin/sh
-PROG=${0##*/}
-dir=$RPM_BUILD_ROOT/usr/share/dokuwiki
-langfile=$1
-tmp=$(mktemp) || exit 1
-rc=0
-
-find $dir -type d -name lang > $tmp
-
-echo '%defattr(644,root,root,755)' > $langfile
-while read dir; do
- echo "%dir ${dir#$RPM_BUILD_ROOT}" >> $langfile
- for dir in $dir/*; do
- lang=${dir##*/}
- dir=${dir#$RPM_BUILD_ROOT}
- case "$lang" in
- zh-tw)
- lang=zh_TW
- ;;
- pt-br)
- lang=pt_BR
- ;;
- sl-si)
- lang=sl
- ;;
- id-ni)
- lang=id_NI
- ;;
- ca-va)
- lang=ca_VA
- ;;
- *-*)
- echo >&2 "ERROR: Need mapping for $lang!"
- rc=1
- ;;
- esac
- echo "%lang($lang) ${dir#$RPM_BUILD_ROOT}" >> $langfile
- done
-done < $tmp
-
-if [ "$(egrep -v '(^%defattr|^$)' $langfile | wc -l)" -le 0 ]; then
- echo >&2 "$PROG: Error: international files not found!"
- rc=1
-fi
-
-rm -f $tmp
-exit $rc
Summary: DokuWiki Include Plugin
Summary(pl.UTF-8): Wtyczka Include (dołączania) dla DokuWiki
Name: dokuwiki-plugin-%{plugin}
-Version: 20080707
+Version: 20091127
Release: 1
License: GPL v2
Group: Applications/WWW
-Source0: http://www.chimeric.de/_src/plugin-include.tgz
-# Source0-md5: 61763a3e5fa742e3fd73938054d98b4a
-Source1: dokuwiki-find-lang.sh
-URL: http://www.dokuwiki.org/plugin:include
+Source0: http://cloud.github.com/downloads/dokufreaks/plugin-include/plugin-include.tgz
+# Source0-md5: 984e895d951f00842e35cb8e24fef1e1
+URL: http://www.wikidesign.ch/en/plugin/include/start
+BuildRequires: rpmbuild(macros) >= 1.520
Requires: dokuwiki >= 20080505
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define dokuconf /etc/webapps/dokuwiki
%define dokudir /usr/share/dokuwiki
+%define dokudata /var/lib/dokuwiki
%define plugindir %{dokudir}/lib/plugins/%{plugin}
+%define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot}
%description
This is a very simple yet handy plugin with which you can include
dołączyć inną stronę wiki do bieżącej.
%prep
-%setup -q -n %{plugin}
+%setup -qc
+mv %{plugin}/* .
+
+version=$(cat VERSION)
+if [ "$(echo "$version" | tr -d -)" != %{version} ]; then
+ : %%{version} mismatch
+ exit 1
+fi
%install
rm -rf $RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{plugindir}/{COPYING,README,VERSION}
# find locales
-sh %{SOURCE1} %{name}.lang
+%find_lang %{name}.lang
%clean
rm -rf $RPM_BUILD_ROOT
%post
-# force css cache refresh
+# force js cache refresh
if [ -f %{dokuconf}/local.php ]; then
touch %{dokuconf}/local.php
fi
+# http://www.dokuwiki.org/plugin:include says:
+# It is recommended to delete all cache files in <dokuwiki>/data/cache directly after upgrading the plugin
+# seems doku cache is one letter hex subdirs. nuke those
+rm -rf %{dokudata}/cache/?
+
%files -f %{name}.lang
%defattr(644,root,root,755)
%doc README
%dir %{plugindir}
%{plugindir}/*.php
%{plugindir}/*.css
+%{plugindir}/*.js
%{plugindir}/conf
%{plugindir}/images
%{plugindir}/syntax