contrib/mercurial.spec
author Martin von Zweigbergk <martinvonz@google.com>
Fri, 26 Jan 2018 11:42:47 -0800
branchstable
changeset 35809 f9a82b9b2c36
parent 33679 8fbd56a4073c
child 36144 e84438846c27
permissions -rw-r--r--
unamend: fix command summary line Before this patch, the docstring started with a newline, which led the summary line (shown in e.g. `hg help -c`) to be blank. Differential Revision: https://phab.mercurial-scm.org/D1943
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
21639
57e0f053e529 buildrpm: collect code for building local hg and using it in one place
Mads Kiilerich <madski@unity3d.com>
parents: 21638
diff changeset
     1
%global emacs_lispdir %{_datadir}/emacs/site-lisp
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
     2
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
     3
%define withpython %{nil}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
     4
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
     5
%if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
     6
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
     7
%global pythonver %{withpython}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
     8
%global pythonname Python-%{withpython}
23140
fbd79c2552a6 contrib: update build defaults to latest Python and docutils versions
Mads Kiilerich <madski@unity3d.com>
parents: 22436
diff changeset
     9
%global docutilsname docutils-0.12
23141
a440166d03fc contrib: buildrpm checking of md5 checksums of downloaded Python and Docutils
Mads Kiilerich <madski@unity3d.com>
parents: 23140
diff changeset
    10
%global docutilsmd5 4622263b62c5c771c03502afa3157768
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    11
%global pythonhg python-hg
24729
3e48462ec15a rpms: for packages with their own python, put it in /opt/python-hg
Mads Kiilerich <madski@unity3d.com>
parents: 23143
diff changeset
    12
%global hgpyprefix /opt/%{pythonhg}
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    13
# byte compilation will fail on some some Python /test/ files
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    14
%global _python_bytecompile_errors_terminate_build 0
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    15
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    16
%else
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    17
21639
57e0f053e529 buildrpm: collect code for building local hg and using it in one place
Mads Kiilerich <madski@unity3d.com>
parents: 21638
diff changeset
    18
%global pythonver %(python -c 'import sys;print ".".join(map(str, sys.version_info[:2]))')
57e0f053e529 buildrpm: collect code for building local hg and using it in one place
Mads Kiilerich <madski@unity3d.com>
parents: 21638
diff changeset
    19
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    20
%endif
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    21
12056
85439f43749f mercurial.spec: specify file modes for install
Mads Kiilerich <mads@kiilerich.com>
parents: 11845
diff changeset
    22
Summary: A fast, lightweight Source Control Management system
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    23
Name: mercurial
3863
1ef8ada4370f Remove hard-coded version numbers and release notes from packaging
Matt Mackall <mpm@selenic.com>
parents: 1891
diff changeset
    24
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
    25
Release: 0
10263
25e572394f5c Update license to GPLv2+
Matt Mackall <mpm@selenic.com>
parents: 10255
diff changeset
    26
License: GPLv2+
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    27
Group: Development/Tools
26421
4b0fc75f9403 urls: bulk-change primary website URLs
Matt Mackall <mpm@selenic.com>
parents: 25008
diff changeset
    28
URL: https://mercurial-scm.org/
21641
977e5bd6eb76 buildrpm: include release version in .tar.gz name
Mads Kiilerich <madski@unity3d.com>
parents: 21639
diff changeset
    29
Source0: %{name}-%{version}-%{release}.tar.gz
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    30
%if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    31
Source1: %{pythonname}.tgz
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    32
Source2: %{docutilsname}.tar.gz
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    33
%endif
7424
05a3f2802b13 Fix rpmlint warnings
Mads Kiilerich <mads@kiilerich.com>
parents: 7423
diff changeset
    34
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    35
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    36
BuildRequires: make, gcc, gettext
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    37
%if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    38
BuildRequires: readline-devel, openssl-devel, ncurses-devel, zlib-devel, bzip2-devel
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    39
%else
32233
feb910d2f59b setup: drop support for Python 2.6 (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 28614
diff changeset
    40
BuildRequires: python >= 2.7, python-devel, python-docutils >= 0.5
feb910d2f59b setup: drop support for Python 2.6 (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 28614
diff changeset
    41
Requires: python >= 2.7
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    42
%endif
10255
26fc868cb8b0 mercurial.spec: Alignment with AIX spec by Jim Hague
Mads Kiilerich <mads@kiilerich.com>
parents: 9635
diff changeset
    43
# 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
    44
#Requires: tk
4751
2f2d8c5e7a5c mercurial.spec: add BuildRequires
julian@lava.net
parents: 4750
diff changeset
    45
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    46
%description
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    47
Mercurial is a fast, lightweight source control management system designed
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    48
for efficient handling of very large distributed projects.
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    49
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    50
%prep
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    51
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    52
%if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    53
%setup -q -n mercurial-%{version}-%{release} -a1 -a2
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    54
# despite the comments in cgi.py, we do this to prevent rpmdeps from picking /usr/local/bin/python up
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    55
sed -i '1c#! /usr/bin/env python' %{pythonname}/Lib/cgi.py
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    56
%else
21641
977e5bd6eb76 buildrpm: include release version in .tar.gz name
Mads Kiilerich <madski@unity3d.com>
parents: 21639
diff changeset
    57
%setup -q -n mercurial-%{version}-%{release}
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    58
%endif
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    59
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    60
%build
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    61
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    62
%if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    63
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    64
PYPATH=$PWD/%{pythonname}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    65
cd $PYPATH
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    66
./configure --prefix=%{hgpyprefix}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    67
make all %{?_smp_mflags}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    68
cd -
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    69
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    70
cd %{docutilsname}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    71
LD_LIBRARY_PATH=$PYPATH $PYPATH/python setup.py build
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    72
cd -
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    73
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    74
# verify Python environment
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    75
LD_LIBRARY_PATH=$PYPATH PYTHONPATH=$PWD/%{docutilsname} $PYPATH/python -c 'import sys, zlib, bz2, ssl, curses, readline'
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    76
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    77
# set environment for make
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    78
export PATH=$PYPATH:$PATH
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    79
export LD_LIBRARY_PATH=$PYPATH
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    80
export CFLAGS="-L $PYPATH"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    81
export PYTHONPATH=$PWD/%{docutilsname}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    82
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    83
%endif
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    84
4753
620cea146b19 mercurial.spec: include CONTRIBUTORS, COPYING and man pages in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4752
diff changeset
    85
make all
33679
8fbd56a4073c rpms: add chg
Mathias De Maré <mathias.de_mare@nokia.com>
parents: 32776
diff changeset
    86
make -C contrib/chg
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    87
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    88
%install
7424
05a3f2802b13 Fix rpmlint warnings
Mads Kiilerich <mads@kiilerich.com>
parents: 7423
diff changeset
    89
rm -rf $RPM_BUILD_ROOT
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    90
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    91
%if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    92
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    93
PYPATH=$PWD/%{pythonname}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    94
cd $PYPATH
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    95
make install DESTDIR=$RPM_BUILD_ROOT
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    96
# these .a are not necessary and they are readonly and strip fails - kill them!
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    97
rm -f %{buildroot}%{hgpyprefix}/lib/{,python2.*/config}/libpython2.*.a
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    98
cd -
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    99
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   100
cd %{docutilsname}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   101
LD_LIBRARY_PATH=$PYPATH $PYPATH/python setup.py install --root="$RPM_BUILD_ROOT"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   102
cd -
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   103
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   104
PATH=$PYPATH:$PATH LD_LIBRARY_PATH=$PYPATH make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{hgpyprefix} MANDIR=%{_mandir}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   105
mkdir -p $RPM_BUILD_ROOT%{_bindir}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   106
( cd $RPM_BUILD_ROOT%{_bindir}/ && ln -s ../..%{hgpyprefix}/bin/hg . )
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   107
( cd $RPM_BUILD_ROOT%{_bindir}/ && ln -s ../..%{hgpyprefix}/bin/python2.? %{pythonhg} )
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   108
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   109
%else
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   110
11062
a2a6fd1064df contrib/mercurial.spec: Use DESTDIR variable and 'make install'
Mads Kiilerich <mads@kiilerich.com>
parents: 11014
diff changeset
   111
make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} MANDIR=%{_mandir}
4753
620cea146b19 mercurial.spec: include CONTRIBUTORS, COPYING and man pages in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4752
diff changeset
   112
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   113
%endif
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   114
33679
8fbd56a4073c rpms: add chg
Mathias De Maré <mathias.de_mare@nokia.com>
parents: 32776
diff changeset
   115
install -m 755 contrib/chg/chg $RPM_BUILD_ROOT%{_bindir}/
21638
5337cb17fa1f buildrpm: various minor cleanup
Mads Kiilerich <madski@unity3d.com>
parents: 12056
diff changeset
   116
install -m 755 contrib/hgk $RPM_BUILD_ROOT%{_bindir}/
5337cb17fa1f buildrpm: various minor cleanup
Mads Kiilerich <madski@unity3d.com>
parents: 12056
diff changeset
   117
install -m 755 contrib/hg-ssh $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
   118
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
   119
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
   120
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
   121
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
   122
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
   123
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
   124
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
   125
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
   126
8942
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
   127
mkdir -p $RPM_BUILD_ROOT%{emacs_lispdir}
21638
5337cb17fa1f buildrpm: various minor cleanup
Mads Kiilerich <madski@unity3d.com>
parents: 12056
diff changeset
   128
install -m 644 contrib/mercurial.el $RPM_BUILD_ROOT%{emacs_lispdir}/
5337cb17fa1f buildrpm: various minor cleanup
Mads Kiilerich <madski@unity3d.com>
parents: 12056
diff changeset
   129
install -m 644 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
   130
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
   131
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/mercurial/hgrc.d
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
   132
563
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
   133
%clean
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
   134
rm -rf $RPM_BUILD_ROOT
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
   135
563
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
   136
%files
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
   137
%defattr(-,root,root,-)
10664
9602fc4e6914 mercurial.spec: remove reference to doc/ja
Greg Lindahl <greg@blekko.com>
parents: 10263
diff changeset
   138
%doc CONTRIBUTORS COPYING doc/README doc/hg*.txt doc/hg*.html *.cgi contrib/*.fcgi
10255
26fc868cb8b0 mercurial.spec: Alignment with AIX spec by Jim Hague
Mads Kiilerich <mads@kiilerich.com>
parents: 9635
diff changeset
   139
%doc %attr(644,root,root) %{_mandir}/man?/hg*
22385
95032d2cf96f fedora: remove sample.hgrc from shipped files
Siddharth Agarwal <sid0@fb.com>
parents: 21641
diff changeset
   140
%doc %attr(644,root,root) contrib/*.svg
12056
85439f43749f mercurial.spec: specify file modes for install
Mads Kiilerich <mads@kiilerich.com>
parents: 11845
diff changeset
   141
%dir %{_datadir}/zsh/
85439f43749f mercurial.spec: specify file modes for install
Mads Kiilerich <mads@kiilerich.com>
parents: 11845
diff changeset
   142
%dir %{_datadir}/zsh/site-functions/
4752
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
   143
%{_datadir}/zsh/site-functions/_mercurial
12056
85439f43749f mercurial.spec: specify file modes for install
Mads Kiilerich <mads@kiilerich.com>
parents: 11845
diff changeset
   144
%dir %{_datadir}/emacs/site-lisp/
4752
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
   145
%{_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
   146
%{_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
   147
%{_bindir}/hg
33679
8fbd56a4073c rpms: add chg
Mathias De Maré <mathias.de_mare@nokia.com>
parents: 32776
diff changeset
   148
%{_bindir}/chg
4752
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
   149
%{_bindir}/hgk
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
   150
%{_bindir}/hg-ssh
8942
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
   151
%dir %{_sysconfdir}/bash_completion.d/
12056
85439f43749f mercurial.spec: specify file modes for install
Mads Kiilerich <mads@kiilerich.com>
parents: 11845
diff changeset
   152
%config(noreplace) %{_sysconfdir}/bash_completion.d/mercurial.sh
8942
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
   153
%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
   154
%dir %{_sysconfdir}/mercurial/hgrc.d
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   155
%if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   156
%{_bindir}/%{pythonhg}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   157
%{hgpyprefix}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   158
%else
8867
ff817723280a contrib/buildrpm: Support python 2.4 and 2.6
Mads Kiilerich <mads@kiilerich.com>
parents: 7433
diff changeset
   159
%{_libdir}/python%{pythonver}/site-packages/%{name}-*-py%{pythonver}.egg-info
8942
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
   160
%{_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
   161
%{_libdir}/python%{pythonver}/site-packages/hgext
28614
b927fe8bf0b9 rpms: add hgext3rd to mercurial.spec
Anton Shestakov <av6@dwimlabs.net>
parents: 26421
diff changeset
   162
%{_libdir}/python%{pythonver}/site-packages/hgext3rd
32776
0f55adb73e14 rpms: add hgdemandimport in files
Toshi MARUYAMA <marutosijp2@gmail.com>
parents: 32775
diff changeset
   163
%{_libdir}/python%{pythonver}/site-packages/hgdemandimport
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   164
%endif