summaryrefslogtreecommitdiff
path: root/dokuwiki-plugin-meta.spec
blob: c4f947115370e7305f126c762c6a656257e30cc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
%define		subver	2015-07-24
%define		ver		%(echo %{subver} | tr -d -)
%define		plugin		meta
%define		php_min_version 5.3.0
%include	/usr/lib/rpm/macros.php
Summary:	Dokuwiki Plugin to Set Metadata
Name:		dokuwiki-plugin-%{plugin}
Version:	%{ver}
Release:	1
License:	GPL v2
Group:		Applications/WWW
Source0:	https://github.com/dokufreaks/plugin-meta/archive/8752219/%{plugin}-%{subver}.tar.gz
# Source0-md5:	c335f4ffd1ca022948955093a4d84dea
URL:		https://www.dokuwiki.org/plugin:meta
BuildRequires:	rpmbuild(macros) >= 1.520
Requires:	dokuwiki >= 20061106
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 set metadata for a page. This is useful for
overriding default DokuWiki metadata, for example if you want to
display someone else than the user who pasted the text into the wiki
as the author of a blog entry.

%prep
%setup -qc
mv *-%{plugin}-*/* .

# nothing to do with tests
%{__rm} -r _test

%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}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%dir %{plugindir}
%{plugindir}/*.php
%{plugindir}/*.txt