File mercurial.spec of Package mercurial

#
# spec file for package mercurial (Version 1.0.2)
#
# Copyright (c) 2008 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 fdupes python-devel sgml-skel xmlto
Summary:        Scalable Distributed SCM
Version:        1.0.2
Release:        26
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
Source2:        hgext.rc
Patch:          mercurial-hgk-path-fix.diff
Patch1:         mercurial-1.0.2-python-2.6-compat.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
python setup.py build_ext -i
(cd doc
 for m in *.txt; do
    asciidoc -d manpage -b docbook $m
    xmlto man ${m%%.txt}.xml
 done
)

%install
python setup.py install --prefix=%{_prefix} --root="$RPM_BUILD_ROOT"
for m in doc/*.[0-9]; do 
  mkdir -p $RPM_BUILD_ROOT%{_mandir}/man${m##*.}
  install -c -m 0644 $m $RPM_BUILD_ROOT%{_mandir}/man${m##*.}
done
# 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}
install -c -m 0755 contrib/darcs2hg.py $RPM_BUILD_ROOT%{_bindir}/darcs2hg
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
# install default hgext.rc
mkdir -p $RPM_BUILD_ROOT/etc/mercurial/hgrc.d
install -c -m 0644 %{SOURCE2} $RPM_BUILD_ROOT/etc/mercurial/hgrc.d
%fdupes -s $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%doc README CONTRIBUTORS COPYING
%doc %{_mandir}/man?/*
%doc contrib/sample.hgrc
%{_bindir}/*
%{py_sitedir}/*
# FIXME: buggy file
# /etc/bash_completion.d/*
%dir /etc/mercurial
%dir /etc/mercurial/hgrc.d
%config /etc/mercurial/hgrc.d/hgext.rc
%{_datadir}/emacs
%{_datadir}/xemacs

%changelog
* Tue Sep 30 2008 tiwai@suse.de
- Fix python-2.6 warnings in many commands;
  Backported python-2.6 wrapper patch from the upstream
* Fri Aug 15 2008 bwalle@suse.de
- updated to version 1.0.2:
  Security:
  * ensure that git patches only touch files within the
  repository (CVE-2008-2942)
  * hgweb: fix "allowpull" permission being ignored when pulling
  from hgweb
  General:
  * commit: handle copies of previously deleted files
  * bisect: allow for having multiple resulting changesets
  * fix Python 2.3 compatibility
  * make mq patches and .hgtags hardlink-safe again
  * various documentation improvements and fixes
  * fix a crash when addremove was called to replace a deleted
  directory with a symlink
  * make branches output easier to parse
  * fix inactive branches detection
  * hgweb: fix a crash in archive when the URL did not end in an
  expected archive type
  * sshserver: fix a crash in error handling code
  * fix the patchbomb extension on Windows by including email
  package in binary installations
  * handle symlinks when OS supports them but FS doesn't
  Extensions:
  * mq:
  o fix qrefresh losing metadata on the last refreshed file
  o fix a crash when renaming a patch just after a versioned
  queue initialization
  o fix the path of an explicitly specified queue when merging
  patches
  o strip now updates the working directory only if a parent
  was stripped
  * convert:
  o CVS: fix a crash when converting an existing working copy
  o monotone: fix quotes and backslashes parsing when reading
  commit messages
  o Subversion: correctly normalize paths and slashes
  o Subversion: fix compatibility with Subversion 1.5
  o git: allow converter to work with recent git releases
  * color:
  o get coloring for qseries --verbose output
  o improve mq extension detection
  o reset coloring before and after outputting colorized lines
  * highlight: fix a performance issue when detecting file types
  from large files
  * notify: take the diff options into account
* Fri Aug 08 2008 tiwai@suse.de
- enable acl extension as default (as was in the earlier versions)
- remove unneeded hgrc file
* Fri Aug 08 2008 bphilips@suse.de
- enable all the plugins that ship by default: /etc/mercurial/hgrc.d
* Mon Jun 30 2008 tiwai@suse.de
- VUL-0: mercurial: Insufficient input validation (bnc#404959)
* Tue Jun 10 2008 tiwai@suse.de
- updated to version 1.0.1:
  General:
  * several improvements in file copying implementation
  * allow different default value for diff.unified option
  * allow explicit use of internal merge tools
  Commands:
  * rename: doesn't unlink source file with --after
  * backout: reverse changeset belongs on current branch
  Extensions:
  * convert:
  o svn: improved detection of tags (has also become optional)
  o svn: improved branch handling
  o svn: better detection of file copies
  * mq:
  o expand terse command help texts
  o fix unimplemented qdiff -U option
  * highlight: fix compatibility with older Pygments (0.5.1)
  * churn: allow whitespaces as delimiter in aliases
  * pager: disable when used with --debugger
* Wed Apr 16 2008 tiwai@suse.de
- removed obsolete hbisect in the default hgrc
* Wed Mar 26 2008 crrodriguez@suse.de
- update to version 1.0
  * thousand of bugfixes, improvements and new features
  see http://www.selenic.com/pipermail/mercurial/2008-March/018014.html
* Mon Oct 22 2007 tiwai@suse.de
- updated to version 0.9.5:
  * lots of new feature and fixes,
  see http://www.selenic.com/pipermail/mercurial/2007-October/015150.html
* Wed Sep 05 2007 tiwai@suse.de
- fix error at invoking hgk (#307190)
* Wed Jun 27 2007 tiwai@suse.de
- updated to version 0.9.4:
  * support for symlinks
  * improved tag handling
  * improved merge handling of file and directory renames
  * improved named branch usability
  * numerous improvements to commands
  * generic pre- and post-command hooks
  * improved Windows support
  * basic BeOS and OpenVMS support
  * numerous bug fixes
  * extensions can now be specified in .hg/hgrc
  * new convert extension with CVS support
  * new graphlog extension
  * improved patchbomb extension
  * example FastCGI script
* Tue Dec 19 2006 tiwai@suse.de
- updated to version 0.9.3:
  * improved mq and hgk
  * branch support
  * proper changelog support in UTF-8
  * support for git-style patches
* Mon Jul 31 2006 tiwai@suse.de
- updated to version 0.9.1.
  * New extensions: acl, extdiff, purge
  * New hooks: preupdate
  * Improved performance: remove, clone
* Fri May 12 2006 tiwai@suse.de
- updated to version 0.9.
  * revlogNG support
  * mq extension as default
  * merge command
  * bisect command
  * diff and status are repo-wide
- require rcs for 3-way merge
* Tue Feb 28 2006 jmatejek@suse.cz
- updated to reflect python changes due to #149809
* Mon Feb 06 2006 tiwai@suse.de
- fixed the extension of mq (for x86-64 problem)
- fixed requires and use standard suse rpm macros for python
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Sep 30 2005 tiwai@suse.de
- updated to version 0.7 + mq extension
- removed buggy bash completion.
* Wed Aug 31 2005 tiwai@suse.de
- updated to version 0.6c release.
* Tue Jul 26 2005 tiwai@suse.de
- use version 0.6b release.
- format man page via asciidoc and xmlto.
* Fri Jul 08 2005 tiwai@suse.de
- updated to snapshot 20050708.
* Mon Jul 04 2005 tiwai@suse.de
- fix the version number of snapshot release.
* Fri Jul 01 2005 tiwai@suse.de
- initial version: snapshot 20050701.
openSUSE Build Service is sponsored by