]>
Commit | Line | Data |
---|---|---|
28530c73 | 1 | %define trac_ver 0.12 |
0dfe2e2f | 2 | %define plugin gitplugin |
28530c73 | 3 | Summary: GIT version control plugin for Trac |
0dfe2e2f | 4 | Name: trac-plugin-git |
28530c73 | 5 | Version: %{trac_ver}.0.5 |
f71e6f67 | 6 | Release: 1 |
0dfe2e2f ER |
7 | License: GPL v2 |
8 | Group: Applications/WWW | |
28530c73 ER |
9 | #Source0: http://trac-hacks.org/changeset/latest/gitplugin?old_path=/&format=zip#/%{plugin}-%{version}.zip |
10 | # TH site is down at this moment, so use fedora mirror | |
11 | Source0: http://pkgs.fedoraproject.org/repo/pkgs/trac-git-plugin/TracGit-%{version}dev.tar.gz/b5e624f7c0f3a85240e0f1484492dc15/TracGit-%{version}dev.tar.gz | |
12 | # Source0-md5: b5e624f7c0f3a85240e0f1484492dc15 | |
f71e6f67 | 13 | Patch0: trac-git-plugin-python2.4.patch |
0dfe2e2f ER |
14 | URL: http://trac-hacks.org/wiki/GitPlugin |
15 | BuildRequires: python-devel >= 1:2.4 | |
4aca9edf | 16 | BuildRequires: python-distribute |
17 | BuildRequires: python-modules | |
18 | BuildRequires: rpm-pythonprov | |
19 | BuildRequires: unzip | |
0dfe2e2f ER |
20 | Requires: trac >= %{trac_ver} |
21 | BuildArch: noarch | |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
24 | %description | |
28530c73 | 25 | This Trac plugin provides support for the GIT SCM. |
0dfe2e2f ER |
26 | |
27 | %prep | |
28530c73 ER |
28 | %setup -qn TracGit-%{version}dev |
29 | %if "%{py_ver}" < "2.5" | |
0dfe2e2f | 30 | %patch0 -p1 |
28530c73 | 31 | %endif |
0dfe2e2f ER |
32 | |
33 | %build | |
0dfe2e2f ER |
34 | %{__python} setup.py build |
35 | %{__python} setup.py egg_info | |
36 | ||
37 | %install | |
38 | rm -rf $RPM_BUILD_ROOT | |
0dfe2e2f ER |
39 | %{__python} setup.py install \ |
40 | --single-version-externally-managed \ | |
41 | --optimize 2 \ | |
42 | --root=$RPM_BUILD_ROOT | |
43 | ||
44 | %py_postclean | |
45 | ||
0dfe2e2f ER |
46 | %clean |
47 | rm -rf $RPM_BUILD_ROOT | |
48 | ||
49 | %post | |
50 | if [ "$1" = "1" ]; then | |
51 | %banner -e %{name} <<-'EOF' | |
52 | To enable the %{plugin} plugin, add to conf/trac.ini: | |
53 | ||
54 | [components] | |
55 | tracext.git.* = enabled | |
56 | EOF | |
57 | fi | |
58 | ||
59 | %files | |
60 | %defattr(644,root,root,755) | |
28530c73 | 61 | %doc README |
0dfe2e2f ER |
62 | %dir %{py_sitescriptdir}/tracext |
63 | %{py_sitescriptdir}/tracext/git | |
64 | %{py_sitescriptdir}/TracGit-*.egg-info | |
65 | %{py_sitescriptdir}/TracGit-*-nspkg.pth |