contrib/packaging/mercurial.spec
author Pulkit Goyal <7895pulkit@gmail.com>
Fri, 09 Jul 2021 00:25:07 +0530
branchstable
changeset 47505 ce12b3a54028
parent 47464 25d36300ba8e
child 48332 5d08b289e2e5
permissions -rw-r--r--
Added tag 5.8.1 for changeset 411dc27fd9fd
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
43358
518655314fc5 packaging: use "python3" for fedora29 ... and as buildrpm default
Mads Kiilerich <mads@kiilerich.com>
parents: 43356
diff changeset
     5
%global pythonexe python3
45836
de1f4c431619 packaging: switch centos 7 packaging to python 3
Mathias De Mare <mathias.de_mare@nokia.com>
parents: 43358
diff changeset
     6
%global pythondocutils python3-docutils
43356
5989f697890a packaging: fix docker-centos5 - use pythonexe and set to "python" as before
Mads Kiilerich <mads@kiilerich.com>
parents: 43343
diff changeset
     7
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
     8
%if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
     9
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    10
%global pythonver %{withpython}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    11
%global pythonname Python-%{withpython}
36144
e84438846c27 buildrpm: bump bundled docutils version to 0.14 when building for centos{5,6}
Antonio Muci <a.mux@inwind.it>
parents: 33679
diff changeset
    12
%global docutilsname docutils-0.14
e84438846c27 buildrpm: bump bundled docutils version to 0.14 when building for centos{5,6}
Antonio Muci <a.mux@inwind.it>
parents: 33679
diff changeset
    13
%global docutilsmd5 c53768d63db3873b7d452833553469de
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    14
%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
    15
%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
    16
# 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
    17
%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
    18
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    19
%else
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    20
43341
92a51a45d44c packaging: be explicit about Python version in rpm spec
Mads Kiilerich <mads@kiilerich.com>
parents: 43340
diff changeset
    21
%global pythonver %(%{pythonexe} -c 'import sys;print(".".join(map(str, sys.version_info[:2])))')
21639
57e0f053e529 buildrpm: collect code for building local hg and using it in one place
Mads Kiilerich <madski@unity3d.com>
parents: 21638
diff changeset
    22
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    23
%endif
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    24
12056
85439f43749f mercurial.spec: specify file modes for install
Mads Kiilerich <mads@kiilerich.com>
parents: 11845
diff changeset
    25
Summary: A fast, lightweight Source Control Management system
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    26
Name: mercurial
3863
1ef8ada4370f Remove hard-coded version numbers and release notes from packaging
Matt Mackall <mpm@selenic.com>
parents: 1891
diff changeset
    27
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
    28
Release: 0
10263
25e572394f5c Update license to GPLv2+
Matt Mackall <mpm@selenic.com>
parents: 10255
diff changeset
    29
License: GPLv2+
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    30
Group: Development/Tools
26421
4b0fc75f9403 urls: bulk-change primary website URLs
Matt Mackall <mpm@selenic.com>
parents: 25008
diff changeset
    31
URL: https://mercurial-scm.org/
21641
977e5bd6eb76 buildrpm: include release version in .tar.gz name
Mads Kiilerich <madski@unity3d.com>
parents: 21639
diff changeset
    32
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
    33
%if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    34
Source1: %{pythonname}.tgz
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    35
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
    36
%endif
7424
05a3f2802b13 Fix rpmlint warnings
Mads Kiilerich <mads@kiilerich.com>
parents: 7423
diff changeset
    37
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    38
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    39
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
    40
%if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    41
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
    42
%else
45836
de1f4c431619 packaging: switch centos 7 packaging to python 3
Mathias De Mare <mathias.de_mare@nokia.com>
parents: 43358
diff changeset
    43
BuildRequires: %{pythonexe} >= %{pythonver}, %{pythonexe}-devel, %{pythondocutils}
43358
518655314fc5 packaging: use "python3" for fedora29 ... and as buildrpm default
Mads Kiilerich <mads@kiilerich.com>
parents: 43356
diff changeset
    44
Requires: %{pythonexe} >= %{pythonver}
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    45
%endif
10255
26fc868cb8b0 mercurial.spec: Alignment with AIX spec by Jim Hague
Mads Kiilerich <mads@kiilerich.com>
parents: 9635
diff changeset
    46
# 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
    47
#Requires: tk
4751
2f2d8c5e7a5c mercurial.spec: add BuildRequires
julian@lava.net
parents: 4750
diff changeset
    48
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    49
%description
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    50
Mercurial is a fast, lightweight source control management system designed
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    51
for efficient handling of very large distributed projects.
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    52
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    53
%prep
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    54
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    55
%if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    56
%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
    57
# despite the comments in cgi.py, we do this to prevent rpmdeps from picking /usr/local/bin/python up
43341
92a51a45d44c packaging: be explicit about Python version in rpm spec
Mads Kiilerich <mads@kiilerich.com>
parents: 43340
diff changeset
    58
sed -i '1c#! /usr/bin/env %{pythonexe}' %{pythonname}/Lib/cgi.py
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    59
%else
21641
977e5bd6eb76 buildrpm: include release version in .tar.gz name
Mads Kiilerich <madski@unity3d.com>
parents: 21639
diff changeset
    60
%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
    61
%endif
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    62
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    63
%build
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    64
43342
a6dcac6454c1 packaging: introduce Python3 support as buildrpm --python3
Mads Kiilerich <mads@kiilerich.com>
parents: 43341
diff changeset
    65
export HGPYTHON3=1
a6dcac6454c1 packaging: introduce Python3 support as buildrpm --python3
Mads Kiilerich <mads@kiilerich.com>
parents: 43341
diff changeset
    66
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    67
%if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    68
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    69
PYPATH=$PWD/%{pythonname}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    70
cd $PYPATH
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    71
./configure --prefix=%{hgpyprefix}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    72
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
    73
cd -
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    74
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    75
cd %{docutilsname}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    76
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
    77
cd -
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    78
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    79
# verify Python environment
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    80
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
    81
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    82
# 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
    83
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
    84
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
    85
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
    86
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
    87
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    88
%endif
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    89
43341
92a51a45d44c packaging: be explicit about Python version in rpm spec
Mads Kiilerich <mads@kiilerich.com>
parents: 43340
diff changeset
    90
make all PYTHON=%{pythonexe}
33679
8fbd56a4073c rpms: add chg
Mathias De Maré <mathias.de_mare@nokia.com>
parents: 32776
diff changeset
    91
make -C contrib/chg
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    92
43341
92a51a45d44c packaging: be explicit about Python version in rpm spec
Mads Kiilerich <mads@kiilerich.com>
parents: 43340
diff changeset
    93
sed -i -e '1s|#!/usr/bin/env python$|#!/usr/bin/env %{pythonexe}|' contrib/hg-ssh
92a51a45d44c packaging: be explicit about Python version in rpm spec
Mads Kiilerich <mads@kiilerich.com>
parents: 43340
diff changeset
    94
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    95
%install
7424
05a3f2802b13 Fix rpmlint warnings
Mads Kiilerich <mads@kiilerich.com>
parents: 7423
diff changeset
    96
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
    97
43342
a6dcac6454c1 packaging: introduce Python3 support as buildrpm --python3
Mads Kiilerich <mads@kiilerich.com>
parents: 43341
diff changeset
    98
export HGPYTHON3=1
a6dcac6454c1 packaging: introduce Python3 support as buildrpm --python3
Mads Kiilerich <mads@kiilerich.com>
parents: 43341
diff changeset
    99
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   100
%if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   101
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   102
PYPATH=$PWD/%{pythonname}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   103
cd $PYPATH
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   104
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
   105
# 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
   106
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
   107
cd -
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
cd %{docutilsname}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   110
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
   111
cd -
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   112
47464
25d36300ba8e Backed out changeset 9b8f326731ac
Mathias De Mare <mathias.de_mare@nokia.com>
parents: 47344
diff changeset
   113
PATH=$PYPATH:$PATH LD_LIBRARY_PATH=$PYPATH make install PYTHON=%{pythonexe} DESTDIR=$RPM_BUILD_ROOT PREFIX=%{hgpyprefix} MANDIR=%{_mandir} PURE="--rust"
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   114
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
   115
( 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
   116
( 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
   117
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   118
%else
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   119
47464
25d36300ba8e Backed out changeset 9b8f326731ac
Mathias De Mare <mathias.de_mare@nokia.com>
parents: 47344
diff changeset
   120
make install PYTHON=%{pythonexe} DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} MANDIR=%{_mandir} PURE="--rust"
4753
620cea146b19 mercurial.spec: include CONTRIBUTORS, COPYING and man pages in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4752
diff changeset
   121
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   122
%endif
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   123
33679
8fbd56a4073c rpms: add chg
Mathias De Maré <mathias.de_mare@nokia.com>
parents: 32776
diff changeset
   124
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
   125
install -m 755 contrib/hgk $RPM_BUILD_ROOT%{_bindir}/
5337cb17fa1f buildrpm: various minor cleanup
Mads Kiilerich <madski@unity3d.com>
parents: 12056
diff changeset
   126
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
   127
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
   128
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
   129
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
   130
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
   131
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
   132
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
   133
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
   134
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
   135
8942
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
   136
mkdir -p $RPM_BUILD_ROOT%{emacs_lispdir}
21638
5337cb17fa1f buildrpm: various minor cleanup
Mads Kiilerich <madski@unity3d.com>
parents: 12056
diff changeset
   137
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
   138
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
   139
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
   140
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/mercurial/hgrc.d
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
   141
563
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
   142
%clean
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
   143
rm -rf $RPM_BUILD_ROOT
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
   144
563
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
   145
%files
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
   146
%defattr(-,root,root,-)
43343
73d1bbf817cd packaging: also include hgweb.wsgi in rpms
Mads Kiilerich <mads@kiilerich.com>
parents: 43342
diff changeset
   147
%doc CONTRIBUTORS COPYING doc/README doc/hg*.txt doc/hg*.html *.cgi contrib/*.fcgi contrib/*.wsgi
10255
26fc868cb8b0 mercurial.spec: Alignment with AIX spec by Jim Hague
Mads Kiilerich <mads@kiilerich.com>
parents: 9635
diff changeset
   148
%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
   149
%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
   150
%dir %{_datadir}/zsh/
85439f43749f mercurial.spec: specify file modes for install
Mads Kiilerich <mads@kiilerich.com>
parents: 11845
diff changeset
   151
%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
   152
%{_datadir}/zsh/site-functions/_mercurial
12056
85439f43749f mercurial.spec: specify file modes for install
Mads Kiilerich <mads@kiilerich.com>
parents: 11845
diff changeset
   153
%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
   154
%{_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
   155
%{_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
   156
%{_bindir}/hg
33679
8fbd56a4073c rpms: add chg
Mathias De Maré <mathias.de_mare@nokia.com>
parents: 32776
diff changeset
   157
%{_bindir}/chg
4752
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
   158
%{_bindir}/hgk
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
   159
%{_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
   160
%dir %{_sysconfdir}/bash_completion.d/
12056
85439f43749f mercurial.spec: specify file modes for install
Mads Kiilerich <mads@kiilerich.com>
parents: 11845
diff changeset
   161
%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
   162
%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
   163
%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
   164
%if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   165
%{_bindir}/%{pythonhg}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   166
%{hgpyprefix}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   167
%else
8867
ff817723280a contrib/buildrpm: Support python 2.4 and 2.6
Mads Kiilerich <mads@kiilerich.com>
parents: 7433
diff changeset
   168
%{_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
   169
%{_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
   170
%{_libdir}/python%{pythonver}/site-packages/hgext
28614
b927fe8bf0b9 rpms: add hgext3rd to mercurial.spec
Anton Shestakov <av6@dwimlabs.net>
parents: 26421
diff changeset
   171
%{_libdir}/python%{pythonver}/site-packages/hgext3rd
32776
0f55adb73e14 rpms: add hgdemandimport in files
Toshi MARUYAMA <marutosijp2@gmail.com>
parents: 32775
diff changeset
   172
%{_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
   173
%endif