File bzr.spec of Package bzr

#
# spec file for package bzr
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           bzr
Version:        2.7.0
Release:        0
Summary:        Friendly distributed version control system
License:        GPL-2.0
Group:          Development/Tools/Version Control
Url:            http://bazaar.canonical.com/
Source0:        https://launchpad.net/bzr/2.7/%{version}/+download/%{name}-%{version}.tar.gz
Source1:        https://launchpad.net/bzr/2.7/%{version}/+download/%{name}-%{version}.tar.gz.sig
Source2:        %{name}.keyring
Patch0:         bzr-doc-timestamp.patch
BuildRequires:  fdupes
BuildRequires:  python-Cython
BuildRequires:  python-devel
# Testsuite requirements:
# For httplib.HTTPSConnection SSL:
#BuildRequires:  python
#BuildRequires:  python-testtools
#BuildRequires:  python-xml
Requires:       python-xml
Recommends:     %{name}-lang = %{version}

%description
Bazaar is a distributed version control system designed to be easy to
use and intuitive, able to adapt to many workflows, reliable, and
easily extendable.

%package test
Summary:        Friendly distributed version control system - Testsuite
Group:          Development/Tools/Version Control
Requires:       %{name} = %{version}

%description test
This package contains testsuite files for %{name}.

%lang_package

%prep
%setup -q
%patch0 -p1
sed -i "s|\"share/locale\"|\"locale\"|" setup.py # Fix the locale installation path

%build
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build
# TODO: generate documentation:
#make docs

%install
python setup.py install --root %{buildroot} --prefix %{_prefix} --install-data %{_datadir}

# Install bash completion
install -D -m 0644 contrib/bash/bzr \
  %{buildroot}%{_datadir}/bash-completion/completions/bzr

%find_lang %{name}

# TODO: Disable for now, takes ages:
#%%check
#python bzr selftest

%files
%doc COPYING.txt NEWS* README
%{_bindir}/bzr
%{python_sitearch}/bzrlib
%{python_sitearch}/bzr-%{version}-*.egg-info
%exclude %{python_sitearch}/bzrlib/tests
%{_mandir}/man1/%{name}.1%{ext_man}
%{_datadir}/bash-completion/completions/%{name}

%files lang -f %{name}.lang

%files test
%{python_sitearch}/bzrlib/tests

%changelog
openSUSE Build Service is sponsored by