2 %define plugin trachours
3 Summary: Trac plugin to track hours spent on tickets
4 Name: trac-plugin-hours
8 Group: Applications/WWW
9 Source0: http://trac-hacks.org/changeset/latest/trachoursplugin?old_path=/&filename=trachoursplugin&format=zip#/trachoursplugin.zip
10 # Source0-md5: 0c51648583b3c467ff91954591c08462
11 URL: http://trac-hacks.org/wiki/TracHoursPlugin
12 BuildRequires: python-devel
13 BuildRequires: python-modules
14 BuildRequires: python-setuptools
15 BuildRequires: rpm-pythonprov
17 Requires: python >= 1:2.4
18 Requires: python-dateutil >= 1.3-4
19 Requires: python-feedparser
20 Requires: trac >= %{trac_ver}
21 Requires: trac-plugin-componentdependency
22 Requires: trac-plugin-sqlhelper
23 Requires: trac-plugin-ticketsidebarprovider
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 The goal of this plugin is to help keep trac of hours worked on
33 mv %{plugin}plugin/%{trac_ver}/* .
36 %{__python} setup.py build
37 %{__python} setup.py egg_info
39 ver=$(awk '$1 == "Version:" {print $2}' *.egg-info/PKG-INFO)
40 test "$ver" = %{version}
43 rm -rf $RPM_BUILD_ROOT
44 %{__python} setup.py install \
45 --single-version-externally-managed \
47 --root=$RPM_BUILD_ROOT
52 rm -rf $RPM_BUILD_ROOT
55 trac-enableplugin "trachours.*"
57 if [ "$1" = "1" ]; then
58 %banner -e %{name} <<-'EOF'
60 Add users to the group TICKET_ADD_HOURS so they can fill hours.
61 You will need to run trac-admin <env> upgrade in order to create the correct database tables.
66 %defattr(644,root,root,755)
68 %{py_sitescriptdir}/%{plugin}
69 %{py_sitescriptdir}/*-*.egg-info