]> git.pld-linux.org Git - packages/dokuwiki-plugin-include.git/commitdiff
- up to 20091127 auto/th/dokuwiki-plugin-include-20091127-1
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 29 Sep 2010 07:16:56 +0000 (07:16 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    dokuwiki-find-lang.sh -> 1.7
    dokuwiki-plugin-include.spec -> 1.11

dokuwiki-find-lang.sh [deleted file]
dokuwiki-plugin-include.spec

diff --git a/dokuwiki-find-lang.sh b/dokuwiki-find-lang.sh
deleted file mode 100644 (file)
index db54c83..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/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
index 5562f2b5fe28e03077b9d4c2d6580663b6748a5c..fd6ec880de12c1b7588f90c9a5f5f99efa7ac756 100644 (file)
@@ -2,21 +2,23 @@
 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
@@ -27,7 +29,14 @@ To jest bardzo prosta, ale pomocna wtyczka, przy pomocy której można
 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
@@ -36,23 +45,29 @@ cp -a . $RPM_BUILD_ROOT%{plugindir}
 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
This page took 0.072964 seconds and 4 git commands to generate.