File mercurial.spec of Package mercurial
#
# spec file for package mercurial (Version 1.3.1)
#
# Copyright (c) 2009 SUSE LINUX Products 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/
#
# norootforbuild
Name: mercurial
BuildRequires: asciidoc gcc python-devel sgml-skel xmlto
%if %suse_version > 1020
BuildRequires: fdupes
%endif
Summary: Scalable Distributed SCM
Version: 1.3.1
Release: 1
License: GPL v2 or later
Group: Development/Tools/Version Control
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://www.selenic.com/mercurial/
Source: %{name}-%{version}.tar.bz2
Patch: mercurial-hgk-path-fix.diff
Patch1: mercurial-sle10-inotify-fixes.diff
# require rcs for 3-way "merge" command.
Requires: rcs
%py_requires
%description
Mercurial is a fast, lightweight source control management system
designed for efficient handling of very large distributed projects.
Authors:
--------
Matt Mackall <mpm@selenic.com>
%prep
%setup -q
# %setup -n %{name}-%{version}-mq
# set version number manually (for snapshot only)
# sed -e s"/^version = ''$/version = '"%{version}"'/" setup.py > foo.py
# mv foo.py setup.py
%patch
%patch1 -p1
%build
make all PREFIX=/usr
%install
python setup.py install --prefix=%{_prefix} --root="$RPM_BUILD_ROOT"
make -C doc DESTDIR=$RPM_BUILD_ROOT PREFIX=/usr install
# install programs in contrib
install -c -m 0755 contrib/hgk $RPM_BUILD_ROOT%{_bindir}
install -c -m 0755 contrib/convert-repo $RPM_BUILD_ROOT%{_bindir}
python%{py_ver} %{py_libdir}/compileall.py -d %{py_site}/ \
$RPM_BUILD_ROOT/%{py_sitedir}
# FIXME: the file seems buggy on mercurial-0.7
# mkdir -p $RPM_BUILD_ROOT/etc/bash_completion.d
# install -c -m 0644 contrib/bash_completion $RPM_BUILD_ROOT/etc/bash_completion.d/mercurial.sh
mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp
install -c -m 0644 contrib/*.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp
mkdir -p $RPM_BUILD_ROOT%{_datadir}/xemacs/site-lisp
install -c -m 0644 contrib/*.el $RPM_BUILD_ROOT%{_datadir}/xemacs/site-lisp
mkdir -p $RPM_BUILD_ROOT/etc/mercurial/hgrc.d
%if %suse_version > 1020
%fdupes -s $RPM_BUILD_ROOT
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%doc README CONTRIBUTORS COPYING
%{_mandir}/man?/*
%doc contrib/sample.hgrc
%{_bindir}/*
%{py_sitedir}/*
# FIXME: buggy file
# /etc/bash_completion.d/*
%dir /etc/mercurial
%dir /etc/mercurial/hgrc.d
%{_datadir}/emacs
%{_datadir}/xemacs
%changelog