File bzr.spec of Package bzr
#
# spec file for package bzr
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: bzr
Version: 2.0.0
Release: 0
License: GNU General Public License (GPL)
Group: Development/Tools/Version Control
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
BuildRequires: zlib-devel
# For the emacs and xemacs subpackages
BuildRequires: emacs-nox
%if 0%{?suse_version}
BuildRequires: pyrex xemacs
%endif
# for the bash and zsh subpackages
BuildRequires: bash zsh
%if 0%{?suse_version}
# New pythons have this.
%if 0%{?suse_version} < 1030
BuildRequires: python-elementtree
Requires: python-elementtree
%endif
# They all need this, however.
%{py_requires}
# And they all can make use of this.
Recommends: python-curl
%else
Requires: python
Requires: python-pycurl
%endif
URL: http://bazaar-vcs.org/
Source: bzr-%{version}.tar.bz2
Source1: README.bzr-sftp
# Source: bzr-1.5rc1.tar.bz2
Summary: Friendly distributed version control system
%description
Bazaar-NG is a distributed revision control system that is powerful,
friendly, and scalable. It is the successor of the bazaar RCS which, in
turn, was a user-friendly reimplementation of GNU Arch.
Authors:
--------
Martin Pool <mbp@canonical.com>
Robert Collins <robert.collins@canonical.com>
%package sftp
Summary: sftp support for bzr
Group: Development/Tools/Version Control
Requires: %{name} = %{version}
Requires: python-paramiko
%description sftp
sftp support for bzr.
%package emacs
Summary: Emacs mode for bzr
Group: Development/Tools/Version Control
Requires: %{name} = %{version}
Requires: emacs
%description emacs
Emacs mode for bzr.
%if 0%{?suse_version}
%package xemacs
Summary: XEmacs mode for bzr
Group: Development/Tools/Version Control
Requires: %{name} = %{version}
Requires: xemacs
%description xemacs
XEmacs mode for bzr.
%endif
%package bash
Summary: bash completion for bzr commands
Group: Development/Tools/Version Control
Requires: %{name} = %{version}
Requires: bash
%description bash
bash completion for bzr commands.
%if 0
%package zsh
Summary: zsh completion for bzr commands
Group: Development/Tools/Version Control
Requires: %{name} = %{version}
Requires: zsh
%description zsh
zsh completion for bzr commands. (Unimplemented.)
%endif
%debug_package
%prep
%setup
%build
python setup.py build
%install
%if 0%{?suse_version}
%define __record_arg --record-rpm
%else
%define __record_arg --record
%endif
python setup.py install --root %{buildroot} --prefix %{_prefix} %__record_arg %{name}.files --install-data %{_datadir}
# manpages are compressed
perl -pi -e 's|(%{_mandir}.*\.1)|$1.gz|g' %{name}.files
# /usr/share/man and /usr/share/man1 shouldn't be packaged
cat %{name}.files | grep -v '%dir /usr/share/man' > %{name}.files.tmp && mv %{name}.files.tmp %{name}.files
# install emacs modes
%{__install} -D -m 0644 contrib/emacs/bzr-mode.el $RPM_BUILD_ROOT/%{_datadir}/emacs/site-lisp/bzr-mode.el
%if 0%{?suse_version}
%{__install} -D -m 0644 contrib/emacs/bzr-mode.el $RPM_BUILD_ROOT/%{_datadir}/xemacs/site-lisp/bzr-mode.el
%endif
# install shell completion
%{__install} -D -m 0644 contrib/bash/bzr.simple $RPM_BUILD_ROOT/%{_sysconfdir}/bash_completion.d/bzr.simple.sh
# hmm, how to best install the zsh stuff?
# install the sftp readme
%{__install} -D -m 0644 %{S:1} $RPM_BUILD_ROOT/%{_datadir}/doc/packages/bzr-sftp/README.bzr-sftp
%clean
%{__rm} -rf %{buildroot}
%files -f %{name}.files
%defattr(-,root,root,-)
%doc *.TODO COPYING.txt INSTALL NEWS* README TODO *.ico
%doc tools/ doc/* contrib/
%files sftp
%defattr(-, root, root)
%doc %{_datadir}/doc/packages/bzr-sftp
%files emacs
%defattr(-,root,root)
%{_datadir}/emacs/site-lisp/bzr-mode.el
%if 0%{?suse_version}
%files xemacs
%defattr(-,root,root)
%{_datadir}/xemacs/site-lisp/bzr-mode.el
%endif
%files bash
%defattr(-,root,root)
%{_sysconfdir}/bash_completion.d/bzr.simple.sh
%if 0
%files zsh
%defattr(-,root,root)
%endif
%changelog