]> git.pld-linux.org Git - SPECS.git/blob - trac-plugin-tracvatar.spec
SPECS updated Tue 30 Apr 15:06:09 CEST 2024
[SPECS.git] / trac-plugin-tracvatar.spec
1 %define         trac_ver        0.12
2 %define         plugin          tracvatar
3 Summary:        Adds Gravatar icons to Trac
4 Name:           trac-plugin-%{plugin}
5 Version:        1.7
6 Release:        1
7 License:        MIT
8 Group:          Applications/WWW
9 Source0:        https://bitbucket.org/zzzeek/tracvatar/get/rel_1_7.tar.bz2
10 # Source0-md5:  2a9477232efe7af3d6523dc63c57e917
11 URL:            https://bitbucket.org/zzzeek/tracvatar
12 BuildRequires:  python-devel
13 BuildRequires:  python-distribute
14 BuildRequires:  python-modules
15 BuildRequires:  rpm-pythonprov
16 Requires:       trac >= %{trac_ver}
17 BuildArch:      noarch
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %define         trac_htdocs             /usr/share/trac/htdocs
21 %define         plugin_htdocs   %{trac_htdocs}/%{plugin}
22
23 %description
24 Currently, only Gravatar is supported, but the more open-ended plugin
25 system of Hackergotchi can be re-implemented here if other avatar
26 engines are desired.
27
28 Ideally, Trac itself would just include support for author avatars as
29 a built in, since this is an extremely common and desirable feature.
30
31 For now, the approach of the plugin is to filter specific Trac views,
32 gather all the authors found in the "data" hash being passed to
33 Genshi, then using Genshi filters to insert additional Gravatar nodes.
34
35 Currently supported views are:
36 - Timeline
37 - Issue display
38 - Issue change display (i.e. comments, attachments)
39 - Source browser listing (tested for svn and hg so far)
40 - Individual changeset page (tested for svn and hg so far)
41 - User prefs page (includes link to "change your avatar" at
42   gravatar.com)
43
44 %prep
45 %setup -qc
46 mv zzzeek-tracvatar-*/* .
47
48 %build
49 %{__python} setup.py build
50 %{__python} setup.py egg_info
51
52 ver=$(awk '$1 == "Version:" {print $2}' *.egg-info/PKG-INFO)
53 test "$ver" = %{version}
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57 %{__python} setup.py install \
58         --single-version-externally-managed \
59         --optimize 2 \
60         --root=$RPM_BUILD_ROOT
61
62 install -d $RPM_BUILD_ROOT%{plugin_htdocs}
63 mv $RPM_BUILD_ROOT{%{py_sitescriptdir}/tracvatar/htdocs/*,%{plugin_htdocs}}
64
65 %py_postclean
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %post
71 trac-enableplugin tracvatar.web_ui.avatarmodule
72
73 %files
74 %defattr(644,root,root,755)
75 %doc README.rst CHANGES LICENSE
76 %dir %{py_sitescriptdir}/tracvatar
77 %{py_sitescriptdir}/tracvatar/*.py[co]
78 %{py_sitescriptdir}/tracvatar-%{version}-*.egg-info
79 %{plugin_htdocs}
This page took 0.071095 seconds and 3 git commands to generate.