up to 2016-01-16 master auto/th/dokuwiki-plugin-pagelist-20160116-1
authorElan Ruusamäe <glen@delfi.ee>
Thu, 17 Aug 2017 19:35:48 +0000 (22:35 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Thu, 17 Aug 2017 19:35:48 +0000 (22:35 +0300)
dokuwiki-find-lang.sh [deleted file]
dokuwiki-plugin-pagelist.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 4bbcdf7a9f1c7173229348c5a27ffa4102183ea7..56b8e1704419612c5a89b49f2a63b52b71de2c31 100644 (file)
@@ -1,21 +1,28 @@
+%define                subver  2016-01-16
+%define                ver             %(echo %{subver} | tr -d -)
 %define                plugin          pagelist
+%define                php_min_version 5.3.0
+%include       /usr/lib/rpm/macros.php
 Summary:       DokuWiki Pagelist Plugin
 Name:          dokuwiki-plugin-%{plugin}
-Version:       20080808
+Version:       %{ver}
 Release:       1
 License:       GPL v2
 Group:         Applications/WWW
-Source0:       http://www.chimeric.de/_src/plugin-pagelist.tgz
-# Source0-md5: fd632aca9688a48c682a1ebdfe1e2aba
-Source1:       dokuwiki-find-lang.sh
-URL:           http://www.dokuwiki.org/plugin:pagelist
-Requires:      dokuwiki >= 20061106
+Source0:       https://github.com/dokufreaks/plugin-pagelist/archive/ceb4a8863/%{plugin}-%{subver}.tar.gz
+# Source0-md5: 59fb31867bc8bf59e1a63b616f1eae1f
+URL:           https://www.dokuwiki.org/plugin:pagelist
+BuildRequires: rpm-php-pearprov >= 4.4.2-11
+BuildRequires: rpmbuild(macros) >= 1.553
+Requires:      dokuwiki >= 20131208
+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
 The Pagelist Plugin does - as its name says - list wiki pages in a
@@ -24,9 +31,13 @@ serves as helper plugin for the Blog, Discussion, Editor, Tag, Task
 and Dir plugins.
 
 %prep
-%setup -q -n %{plugin}
-if [ $(cat VERSION | tr -d -) != %{version} ]; then
-       : %%{version} mismatch, should be: $(cat VERSION | tr -d -)
+%setup -qc
+mv *-%{plugin}-*/* .
+
+%build
+version=$(awk '/^date/{print $2}' plugin.info.txt)
+if [ "$(echo "$version" | tr -d -)" != %{version} ]; then
+       : %%{version} mismatch
        exit 1
 fi
 
@@ -36,8 +47,7 @@ install -d $RPM_BUILD_ROOT%{plugindir}
 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
@@ -53,6 +63,7 @@ fi
 %defattr(644,root,root,755)
 %doc README
 %dir %{plugindir}
-%{plugindir}/*.php
 %{plugindir}/*.css
+%{plugindir}/*.php
+%{plugindir}/*.txt
 %{plugindir}/conf
This page took 0.097361 seconds and 4 git commands to generate.