]>
Commit | Line | Data |
---|---|---|
7129cf30 ER |
1 | %define trac_ver 0.11 |
2 | %define plugin PLUGIN_NAME | |
3 | Summary: PLUGIN_NAME Plugin for Trac | |
4 | Name: trac-plugin-%{plugin} | |
5 | Version: 0.1 | |
6 | Release: 0.1 | |
7 | License: BSD-like | |
8 | Group: Applications/WWW | |
9 | # Source0Download: http://trac-hacks.org/changeset/latest/wikirenameplugin?old_path=/&filename=wikirenameplugin&format=zip | |
10 | Source0: %{plugin}plugin.zip | |
11 | # Source0-md5: 9f706e733d205d4467ce6534772cb505 | |
12 | URL: http://trac-hacks.org/wiki/PLUGIN_NAME | |
13 | BuildRequires: python-devel | |
14 | Requires: trac >= %{trac_ver} | |
15 | BuildArch: noarch | |
16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
17 | ||
18 | %description | |
19 | ||
20 | %prep | |
21 | %setup -q -n %{plugin}plugin | |
22 | ||
23 | %build | |
24 | cd %{plugin}/%{version} | |
25 | cd %{trac_ver} | |
26 | %{__python} setup.py build | |
27 | %{__python} setup.py egg_info | |
28 | ||
29 | %install | |
30 | rm -rf $RPM_BUILD_ROOT | |
31 | cd %{trac_ver} | |
32 | cd %{plugin}/%{version} | |
33 | %{__python} setup.py install \ | |
34 | --single-version-externally-managed \ | |
35 | --optimize 2 \ | |
36 | --root=$RPM_BUILD_ROOT | |
37 | ||
38 | %py_postclean | |
39 | ||
40 | %clean | |
41 | rm -rf $RPM_BUILD_ROOT | |
42 | ||
43 | %post | |
44 | if [ "$1" = "1" ]; then | |
45 | %banner -e %{name} <<-'EOF' | |
46 | Don't forget to enable %{plugin} in conf/trac.ini: | |
47 | ||
48 | [components] | |
49 | trac%{plugin}.* = enabled | |
50 | ||
51 | Run trac-admin <env> upgrade on your Trac environment. | |
52 | ||
53 | Restart your web server. | |
54 | EOF | |
55 | #' - vim | |
56 | fi | |
57 | ||
58 | %files | |
59 | %defattr(644,root,root,755) | |
60 | %{py_sitescriptdir}/trac%{plugin} | |
61 | %{py_sitescriptdir}/*-*.egg-info |