]>
Commit | Line | Data |
---|---|---|
cff35ec9 ER |
1 | %define plugin folded |
2 | %define php_min_version 5.0.0 | |
cff35ec9 ER |
3 | Summary: DokuWiki folded plugin |
4 | Name: dokuwiki-plugin-%{plugin} | |
288564bd | 5 | Version: 20130207 |
cff35ec9 ER |
6 | Release: 1 |
7 | License: GPL v2 | |
8 | Group: Applications/WWW | |
288564bd JK |
9 | Source0: https://github.com/dokufreaks/plugin-%{plugin}/tarball/master/%{plugin}-%{version}.tgz |
10 | # Source0-md5: 343fdef474f78cbfdac0c2a0b4902f7c | |
cff35ec9 ER |
11 | URL: http://www.dokuwiki.org/plugin:folded |
12 | BuildRequires: rpm-php-pearprov >= 4.4.2-11 | |
13 | BuildRequires: rpmbuild(macros) >= 1.520 | |
14 | Requires: dokuwiki >= 20070626 | |
15 | Requires: php-common >= 4:%{php_min_version} | |
16 | BuildArch: noarch | |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
18 | ||
19 | %define dokuconf /etc/webapps/dokuwiki | |
20 | %define dokudir /usr/share/dokuwiki | |
21 | %define plugindir %{dokudir}/lib/plugins/%{plugin} | |
22 | %define find_lang %{_usrlibrpm}/dokuwiki-find-lang.sh %{buildroot} | |
23 | ||
24 | %description | |
25 | Foldable page sections for DokuWiki. | |
26 | ||
27 | %prep | |
28 | %setup -qc | |
29 | mv *-%{plugin}-*/* . | |
30 | ||
31 | version=$(awk '/^date/{print $2}' plugin.info.txt) | |
32 | if [ "$(echo "$version" | tr -d -)" != %{version} ]; then | |
33 | : %%{version} mismatch | |
34 | exit 1 | |
35 | fi | |
36 | ||
37 | %install | |
38 | rm -rf $RPM_BUILD_ROOT | |
39 | install -d $RPM_BUILD_ROOT%{plugindir} | |
40 | cp -a . $RPM_BUILD_ROOT%{plugindir} | |
41 | ||
42 | %find_lang %{name}.lang | |
43 | ||
44 | %clean | |
45 | rm -rf $RPM_BUILD_ROOT | |
46 | ||
47 | %post | |
48 | # force js/css cache refresh | |
49 | if [ -f %{dokuconf}/local.php ]; then | |
50 | touch %{dokuconf}/local.php | |
51 | fi | |
52 | ||
53 | %files -f %{name}.lang | |
54 | %defattr(644,root,root,755) | |
55 | %dir %{plugindir} | |
56 | %{plugindir}/*.css | |
57 | %{plugindir}/*.gif | |
58 | %{plugindir}/*.js | |
59 | %{plugindir}/*.txt | |
288564bd | 60 | %{plugindir}/*.php |
cff35ec9 ER |
61 | %{plugindir}/conf |
62 | %{plugindir}/syntax |