summaryrefslogtreecommitdiffstats
path: root/be.spec
blob: 4553b7ba50d5e5113d79c0013330567d26d8d9ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}

Name:           be
Version:        1.0.1
Release:        2%{?dist}
Summary:        Bugs Everywhere, a distributed bug tracker

# for older rpmlint versions
Group:          Development/Tools
License:        GPLv2+
URL:            http://bugseverywhere.org/
Source0:        http://download.bugseverywhere.org/releases/be-%{version}.tar.gz
# from commit 2aeaa4e265deb093a5e37c5973deb8d932974491
Patch0:         be-1.0.0-manpage.patch
# arch (tla) is orphaned in Fedora
# hg module does not support the version in Fedora, and
# monotone support is broken
Patch1:         be-1.0.1-remove_broken_vcs.patch
# extends bzr module's version parser to handle non-fully-numeric versions
Patch2:         be-1.0.1-bzr_verparse.patch
# fix incorrect version number
Patch3:         be-1.0.1-version.patch

BuildArch:      noarch
BuildRequires:  python-docutils

# for testing
BuildRequires:  bzr
BuildRequires:  darcs
BuildRequires:  git
BuildRequires:  PyYAML

Requires:       PyYAML

%if 0%{?el5}
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%endif

%description
This is Bugs Everywhere (BE), a bug tracker built on distributed
version control.  It works with Arch, Bazaar, Darcs, Git, Mercurial,
and Monotone at the moment, but is easily extensible.  It can also
function with no VCS at all.

The idea is to package the bug information with the source code, so
that bugs can be marked "fixed" in the branches that fix them.  So,
instead of numbers, bugs have globally unique ids.


%prep
%setup -q
%patch0 -p1 -b .manpage
%patch1 -p1 -b .remove_broken_vcs
rm -rf libbe/storage/vcs/{arch,hg,monotone}.*
%patch2 -p1 -b .bzr_verparse
%patch3 -p1 -b .version
sed -i '1d' libbe/version.py
sed -i '1d' misc/completion/be.bash
# remove compiled files
find . -name '*.py?' -exec rm '{}' \;


%build
%{__python} setup.py build
# rst2man not in RHEL5's python-docutils
%if ! 0%{?el5}
make man
%endif


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
COMPDIR=$RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
mkdir -p $COMPDIR
cp -p misc/completion/be.bash $COMPDIR/


%check
export LANG=en_US.utf8
bzr whoami "Koji <koji@fedoraproject.org>"
git config --global user.email "koji@fedoraproject.org"
git config --global user.name  "Koji"
%{__python} test.py libbe.storage.{base,util.{config,mapfile,properties,settings_object,upgrade},vcs.{base,bzr,darcs,git}}

%if 0%{?rhel}
%clean
rm -rf $RPM_BUILD_ROOT
%endif

 
%files
### not needed anymore by RPM, but keep rpmlint happy
%defattr(-,root,root,-)
###
%doc COPYING AUTHORS ChangeLog NEWS README
%{_bindir}/be
%{python_sitelib}/*
%dir %{_sysconfdir}/bash_completion.d
%config(noreplace) %{_sysconfdir}/bash_completion.d/be.bash
%if ! 0%{?el5}
%{_mandir}/man1/be.1*
%endif


%changelog
* Thu Aug  4 2011 Michel Salim <salimma@fedoraproject.org> - 1.0.1-2
- Remove currently broken support for arch, hg and monotone
- Improve bzr module's version comparison
- Fix version string
- Partially enable tests

* Wed Jul 13 2011 Michel Salim <salimma@fedoraproject.org> - 1.0.1-1
- Update to 1.0.1

* Thu Mar 24 2011 Michel Salim <salimma@fedoraproject.org> - 1.0.0-2
- add Group: field, for compliance with older rpmlint versions

* Wed Mar 23 2011 Michel Salim <salimma@fedoraproject.org> - 1.0.0-1
- Initial package