]> git.pld-linux.org Git - packages/dokuwiki-plugin-editx.git/blob - dokuwiki-plugin-editx.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/dokuwiki-plugin-editx.git] / dokuwiki-plugin-editx.spec
1 %define         plugin          editx
2 %define         php_min_version 5.0.0
3 Summary:        DokuWiki editx plugin
4 Name:           dokuwiki-plugin-%{plugin}
5 Version:        20140919
6 Release:        1
7 License:        GPL v2
8 Group:          Applications/WWW
9 Source0:        https://github.com/danny0838/dw-editx/tarball/master/%{plugin}-%{version}.tar.gz
10 # Source0-md5:  ea5edbf984caf7ed901979bb8051a94b
11 URL:            https://www.dokuwiki.org/plugin:editx
12 BuildRequires:  rpm-php-pearprov >= 4.4.2-11
13 BuildRequires:  rpmbuild(macros) >= 1.553
14 BuildRequires:  unzip
15 Requires:       dokuwiki >= 20061106
16 Requires:       php(core) >= %{php_min_version}
17 Requires:       php(date)
18 Requires:       php(pcre)
19 BuildArch:      noarch
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %define         dokuconf        /etc/webapps/dokuwiki
23 %define         dokudir         /usr/share/dokuwiki
24 %define         plugindir       %{dokudir}/lib/plugins/%{plugin}
25 %define         find_lang       %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot}
26
27 %description
28 Extended edit functions such as renaming or deleting a page.
29
30 %prep
31 %setup -qc
32 mv *%{plugin}*/* .
33 %undos -f php
34
35 version=$(awk '/^date/{print $2}' plugin.info.txt)
36 if [ "$(echo "$version" | tr -d -)" != %{version} ]; then
37         : %%{version} mismatch
38         exit 1
39 fi
40
41 %install
42 rm -rf $RPM_BUILD_ROOT
43 install -d $RPM_BUILD_ROOT%{plugindir}
44 cp -a . $RPM_BUILD_ROOT%{plugindir}
45
46 %find_lang %{name}.lang
47
48 %clean
49 rm -rf $RPM_BUILD_ROOT
50
51 # use this post section if you package .css or .js files
52 %post
53 # force js/css cache refresh
54 if [ -f %{dokuconf}/local.php ]; then
55         touch %{dokuconf}/local.php
56 fi
57
58 %files -f %{name}.lang
59 %defattr(644,root,root,755)
60 %dir %{plugindir}
61 %{plugindir}/*.php
62 %{plugindir}/*.txt
63 %{plugindir}/conf
This page took 0.847661 seconds and 3 git commands to generate.