]> git.pld-linux.org Git - SPECS.git/blob - trac-plugin-hours.spec
SPECS updated Sun 1 Aug 20:13:02 CEST 2021
[SPECS.git] / trac-plugin-hours.spec
1 %define         trac_ver        0.12
2 %define         plugin          trachours
3 Summary:        Trac plugin to track hours spent on tickets
4 Name:           trac-plugin-hours
5 Version:        0.5.2
6 Release:        2
7 License:        BSD-like
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
16 BuildRequires:  unzip
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
24 BuildArch:      noarch
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 The goal of this plugin is to help keep trac of hours worked on
29 tickets.
30
31 %prep
32 %setup -qc
33 mv %{plugin}plugin/%{trac_ver}/* .
34
35 %build
36 %{__python} setup.py build
37 %{__python} setup.py egg_info
38
39 ver=$(awk '$1 == "Version:" {print $2}' *.egg-info/PKG-INFO)
40 test "$ver" = %{version}
41
42 %install
43 rm -rf $RPM_BUILD_ROOT
44 %{__python} setup.py install \
45         --single-version-externally-managed \
46         --optimize=2 \
47         --root=$RPM_BUILD_ROOT
48
49 %py_postclean
50
51 %clean
52 rm -rf $RPM_BUILD_ROOT
53
54 %post
55 trac-enableplugin "trachours.*"
56
57 if [ "$1" = "1" ]; then
58         %banner -e %{name} <<-'EOF'
59
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.
62 EOF
63 fi
64
65 %files
66 %defattr(644,root,root,755)
67 %doc README.txt
68 %{py_sitescriptdir}/%{plugin}
69 %{py_sitescriptdir}/*-*.egg-info
This page took 0.050885 seconds and 3 git commands to generate.