contrib/mercurial.spec
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
Sun, 21 Feb 2010 22:16:35 +0100
branchstable
changeset 10521 bde1bb250fc2
parent 10263 25e572394f5c
child 10664 9602fc4e6914
permissions -rwxr-xr-x
Do not use osutil.c with python 2.4 and Windows (issue1364) Windows python 2.4 os.stat() reports times including DST offset, while osutil.c reports the correct value, which makes status() systematically compare files content. This bug is fixed in python 2.5. Using osutil.py instead of osutil.c is 4x times slower on large repositories but current code is completely unusable. Given few people are likely to use python 2.4 on Windows this solution was considered a good trade-off compared to more invasive solutions trying to address the offset issue.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
     1
Summary: Mercurial -- a distributed SCM
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
     2
Name: mercurial
3863
1ef8ada4370f Remove hard-coded version numbers and release notes from packaging
Matt Mackall <mpm@selenic.com>
parents: 1891
diff changeset
     3
Version: snapshot
1891
e5c8e38b788f New version/release in mercurial.spec, patchbomb is now in hgext.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 1890
diff changeset
     4
Release: 0
10263
25e572394f5c Update license to GPLv2+
Matt Mackall <mpm@selenic.com>
parents: 10255
diff changeset
     5
License: GPLv2+
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
     6
Group: Development/Tools
8942
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
     7
URL: http://mercurial.selenic.com/
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
     8
Source0: http://mercurial.selenic.com/release/%{name}-%{version}.tar.gz
7424
05a3f2802b13 Fix rpmlint warnings
Mads Kiilerich <mads@kiilerich.com>
parents: 7423
diff changeset
     9
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    10
4751
2f2d8c5e7a5c mercurial.spec: add BuildRequires
julian@lava.net
parents: 4750
diff changeset
    11
# From the README:
2f2d8c5e7a5c mercurial.spec: add BuildRequires
julian@lava.net
parents: 4750
diff changeset
    12
#
2f2d8c5e7a5c mercurial.spec: add BuildRequires
julian@lava.net
parents: 4750
diff changeset
    13
#   Note: some distributions fails to include bits of distutils by
2f2d8c5e7a5c mercurial.spec: add BuildRequires
julian@lava.net
parents: 4750
diff changeset
    14
#   default, you'll need python-dev to install. You'll also need a C
2f2d8c5e7a5c mercurial.spec: add BuildRequires
julian@lava.net
parents: 4750
diff changeset
    15
#   compiler and a 3-way merge tool like merge, tkdiff, or kdiff3.
2f2d8c5e7a5c mercurial.spec: add BuildRequires
julian@lava.net
parents: 4750
diff changeset
    16
#
2f2d8c5e7a5c mercurial.spec: add BuildRequires
julian@lava.net
parents: 4750
diff changeset
    17
# python-devel provides an adequate python-dev.  The merge tool is a
2f2d8c5e7a5c mercurial.spec: add BuildRequires
julian@lava.net
parents: 4750
diff changeset
    18
# run-time dependency.
2f2d8c5e7a5c mercurial.spec: add BuildRequires
julian@lava.net
parents: 4750
diff changeset
    19
#
9635
5d8125bbbbf4 mercurial.spec: update requirements for the build
Gilles Moris <gilles.moris@free.fr>
parents: 8942
diff changeset
    20
BuildRequires: python >= 2.4, python-devel, make, gcc, docutils >= 0.5
8942
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
    21
Provides: hg = %{version}-%{release}
10255
26fc868cb8b0 mercurial.spec: Alignment with AIX spec by Jim Hague
Mads Kiilerich <mads@kiilerich.com>
parents: 9635
diff changeset
    22
Requires: python >= 2.4
26fc868cb8b0 mercurial.spec: Alignment with AIX spec by Jim Hague
Mads Kiilerich <mads@kiilerich.com>
parents: 9635
diff changeset
    23
# The hgk extension uses the wish tcl interpreter, but we don't enforce it
26fc868cb8b0 mercurial.spec: Alignment with AIX spec by Jim Hague
Mads Kiilerich <mads@kiilerich.com>
parents: 9635
diff changeset
    24
#Requires: tk
4751
2f2d8c5e7a5c mercurial.spec: add BuildRequires
julian@lava.net
parents: 4750
diff changeset
    25
563
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
    26
%define pythonver %(python -c 'import sys;print ".".join(map(str, sys.version_info[:2]))')
8942
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
    27
%define emacs_lispdir %{_datadir}/emacs/site-lisp
563
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
    28
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    29
%description
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    30
Mercurial is a fast, lightweight source control management system designed
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    31
for efficient handling of very large distributed projects.
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    32
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    33
%prep
1273
ab22af71386f Clean up RPM spec file
Florian La Roche <laroche@redhat.com>
parents: 563
diff changeset
    34
%setup -q
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    35
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    36
%build
4753
620cea146b19 mercurial.spec: include CONTRIBUTORS, COPYING and man pages in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4752
diff changeset
    37
make all
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    38
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    39
%install
7424
05a3f2802b13 Fix rpmlint warnings
Mads Kiilerich <mads@kiilerich.com>
parents: 7423
diff changeset
    40
rm -rf $RPM_BUILD_ROOT
4750
87a35bb58b88 mercurial.spec: fix when default python prefix != rpm %{_prefix}
Adam Spiers <hg@adamspiers.org>
parents: 3863
diff changeset
    41
python setup.py install --root $RPM_BUILD_ROOT --prefix %{_prefix}
4753
620cea146b19 mercurial.spec: include CONTRIBUTORS, COPYING and man pages in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4752
diff changeset
    42
make install-doc DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir}
620cea146b19 mercurial.spec: include CONTRIBUTORS, COPYING and man pages in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4752
diff changeset
    43
4752
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
    44
install contrib/hgk          $RPM_BUILD_ROOT%{_bindir}
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
    45
install contrib/convert-repo $RPM_BUILD_ROOT%{_bindir}/mercurial-convert-repo
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
    46
install contrib/hg-ssh       $RPM_BUILD_ROOT%{_bindir}
10255
26fc868cb8b0 mercurial.spec: Alignment with AIX spec by Jim Hague
Mads Kiilerich <mads@kiilerich.com>
parents: 9635
diff changeset
    47
install contrib/git-viz/hg-viz $RPM_BUILD_ROOT%{_bindir}
26fc868cb8b0 mercurial.spec: Alignment with AIX spec by Jim Hague
Mads Kiilerich <mads@kiilerich.com>
parents: 9635
diff changeset
    48
install contrib/git-viz/git-rev-tree $RPM_BUILD_ROOT%{_bindir}
4752
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
    49
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
    50
bash_completion_dir=$RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
    51
mkdir -p $bash_completion_dir
8942
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
    52
install -m 644 contrib/bash_completion $bash_completion_dir/mercurial.sh
4752
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
    53
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
    54
zsh_completion_dir=$RPM_BUILD_ROOT%{_datadir}/zsh/site-functions
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
    55
mkdir -p $zsh_completion_dir
8942
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
    56
install -m 644 contrib/zsh_completion $zsh_completion_dir/_mercurial
4752
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
    57
8942
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
    58
mkdir -p $RPM_BUILD_ROOT%{emacs_lispdir}
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
    59
install contrib/mercurial.el $RPM_BUILD_ROOT%{emacs_lispdir}
10255
26fc868cb8b0 mercurial.spec: Alignment with AIX spec by Jim Hague
Mads Kiilerich <mads@kiilerich.com>
parents: 9635
diff changeset
    60
install contrib/mq.el $RPM_BUILD_ROOT%{emacs_lispdir}
8942
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
    61
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
    62
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/mercurial/hgrc.d
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
    63
install contrib/mergetools.hgrc $RPM_BUILD_ROOT%{_sysconfdir}/mercurial/hgrc.d/mergetools.rc
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    64
563
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
    65
%clean
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
    66
rm -rf $RPM_BUILD_ROOT
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    67
563
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
    68
%files
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
    69
%defattr(-,root,root,-)
8942
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
    70
%doc CONTRIBUTORS COPYING doc/README doc/hg*.txt doc/hg*.html doc/ja *.cgi contrib/*.fcgi
10255
26fc868cb8b0 mercurial.spec: Alignment with AIX spec by Jim Hague
Mads Kiilerich <mads@kiilerich.com>
parents: 9635
diff changeset
    71
%doc %attr(644,root,root) %{_mandir}/man?/hg*
8942
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
    72
%doc %attr(644,root,root) contrib/*.svg contrib/sample.hgrc
4752
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
    73
%{_sysconfdir}/bash_completion.d/mercurial.sh
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
    74
%{_datadir}/zsh/site-functions/_mercurial
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
    75
%{_datadir}/emacs/site-lisp/mercurial.el
10255
26fc868cb8b0 mercurial.spec: Alignment with AIX spec by Jim Hague
Mads Kiilerich <mads@kiilerich.com>
parents: 9635
diff changeset
    76
%{_datadir}/emacs/site-lisp/mq.el
4752
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
    77
%{_bindir}/hg
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
    78
%{_bindir}/hgk
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
    79
%{_bindir}/hg-ssh
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
    80
%{_bindir}/hg-viz
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
    81
%{_bindir}/git-rev-tree
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
    82
%{_bindir}/mercurial-convert-repo
8942
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
    83
%dir %{_sysconfdir}/bash_completion.d/
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
    84
%dir %{_datadir}/zsh/site-functions/
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
    85
%dir %{_sysconfdir}/mercurial
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
    86
%dir %{_sysconfdir}/mercurial/hgrc.d
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
    87
%config(noreplace) %{_sysconfdir}/mercurial/hgrc.d/mergetools.rc
8867
ff817723280a contrib/buildrpm: Support python 2.4 and 2.6
Mads Kiilerich <mads@kiilerich.com>
parents: 7433
diff changeset
    88
%if "%{?pythonver}" != "2.4"
ff817723280a contrib/buildrpm: Support python 2.4 and 2.6
Mads Kiilerich <mads@kiilerich.com>
parents: 7433
diff changeset
    89
%{_libdir}/python%{pythonver}/site-packages/%{name}-*-py%{pythonver}.egg-info
ff817723280a contrib/buildrpm: Support python 2.4 and 2.6
Mads Kiilerich <mads@kiilerich.com>
parents: 7433
diff changeset
    90
%endif
8942
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
    91
%{_libdir}/python%{pythonver}/site-packages/%{name}
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
    92
%{_libdir}/python%{pythonver}/site-packages/hgext