contrib/packaging/mercurial.spec
author Pulkit Goyal <7895pulkit@gmail.com>
Thu, 03 Sep 2020 13:58:14 +0530
changeset 45585 479cce8c9882
parent 43358 518655314fc5
child 45836 de1f4c431619
permissions -rw-r--r--
commit: force create a new filenode if it was set in mergestate by merge For reasons mentioned in previous commits, we will like to forcefully create a new filenode sometimes. Combination of this patch and previous one, we fixed a case in `test-merge-combination.t`. This does not yet results in conflict where it should, I need to investigate more about what's happening as it should be a change-delete conflict now. Differential Revision: https://phab.mercurial-scm.org/D8989
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
43356
5989f697890a packaging: fix docker-centos5 - use pythonexe and set to "python" as before
Mads Kiilerich <mads@kiilerich.com>
parents: 43343
diff changeset
     6
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
     7
%if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
     8
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
     9
%global pythonver %{withpython}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    10
%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
    11
%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
    12
%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
    13
%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
    14
%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
    15
# 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
    16
%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
    17
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    18
%else
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    19
43341
92a51a45d44c packaging: be explicit about Python version in rpm spec
Mads Kiilerich <mads@kiilerich.com>
parents: 43340
diff changeset
    20
%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
    21
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    22
%endif
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    23
12056
85439f43749f mercurial.spec: specify file modes for install
Mads Kiilerich <mads@kiilerich.com>
parents: 11845
diff changeset
    24
Summary: A fast, lightweight Source Control Management system
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    25
Name: mercurial
3863
1ef8ada4370f Remove hard-coded version numbers and release notes from packaging
Matt Mackall <mpm@selenic.com>
parents: 1891
diff changeset
    26
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
    27
Release: 0
10263
25e572394f5c Update license to GPLv2+
Matt Mackall <mpm@selenic.com>
parents: 10255
diff changeset
    28
License: GPLv2+
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    29
Group: Development/Tools
26421
4b0fc75f9403 urls: bulk-change primary website URLs
Matt Mackall <mpm@selenic.com>
parents: 25008
diff changeset
    30
URL: https://mercurial-scm.org/
21641
977e5bd6eb76 buildrpm: include release version in .tar.gz name
Mads Kiilerich <madski@unity3d.com>
parents: 21639
diff changeset
    31
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
    32
%if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    33
Source1: %{pythonname}.tgz
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    34
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
    35
%endif
7424
05a3f2802b13 Fix rpmlint warnings
Mads Kiilerich <mads@kiilerich.com>
parents: 7423
diff changeset
    36
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    37
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    38
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
    39
%if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    40
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
    41
%else
43358
518655314fc5 packaging: use "python3" for fedora29 ... and as buildrpm default
Mads Kiilerich <mads@kiilerich.com>
parents: 43356
diff changeset
    42
BuildRequires: %{pythonexe} >= %{pythonver}, %{pythonexe}-devel, %{pythonexe}-docutils >= 0.5
518655314fc5 packaging: use "python3" for fedora29 ... and as buildrpm default
Mads Kiilerich <mads@kiilerich.com>
parents: 43356
diff changeset
    43
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
    44
%endif
10255
26fc868cb8b0 mercurial.spec: Alignment with AIX spec by Jim Hague
Mads Kiilerich <mads@kiilerich.com>
parents: 9635
diff changeset
    45
# 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
    46
#Requires: tk
4751
2f2d8c5e7a5c mercurial.spec: add BuildRequires
julian@lava.net
parents: 4750
diff changeset
    47
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    48
%description
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    49
Mercurial is a fast, lightweight source control management system designed
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    50
for efficient handling of very large distributed projects.
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    51
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    52
%prep
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    53
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    54
%if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    55
%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
    56
# 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
    57
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
    58
%else
21641
977e5bd6eb76 buildrpm: include release version in .tar.gz name
Mads Kiilerich <madski@unity3d.com>
parents: 21639
diff changeset
    59
%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
    60
%endif
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    61
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    62
%build
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    63
43342
a6dcac6454c1 packaging: introduce Python3 support as buildrpm --python3
Mads Kiilerich <mads@kiilerich.com>
parents: 43341
diff changeset
    64
export HGPYTHON3=1
a6dcac6454c1 packaging: introduce Python3 support as buildrpm --python3
Mads Kiilerich <mads@kiilerich.com>
parents: 43341
diff changeset
    65
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    66
%if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    67
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    68
PYPATH=$PWD/%{pythonname}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    69
cd $PYPATH
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    70
./configure --prefix=%{hgpyprefix}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    71
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
    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
cd %{docutilsname}
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 $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
    76
cd -
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    77
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    78
# verify Python environment
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    79
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
    80
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    81
# 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
    82
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
    83
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
    84
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
    85
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
    86
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    87
%endif
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    88
43341
92a51a45d44c packaging: be explicit about Python version in rpm spec
Mads Kiilerich <mads@kiilerich.com>
parents: 43340
diff changeset
    89
make all PYTHON=%{pythonexe}
33679
8fbd56a4073c rpms: add chg
Mathias De Maré <mathias.de_mare@nokia.com>
parents: 32776
diff changeset
    90
make -C contrib/chg
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    91
43341
92a51a45d44c packaging: be explicit about Python version in rpm spec
Mads Kiilerich <mads@kiilerich.com>
parents: 43340
diff changeset
    92
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
    93
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
    94
%install
7424
05a3f2802b13 Fix rpmlint warnings
Mads Kiilerich <mads@kiilerich.com>
parents: 7423
diff changeset
    95
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
    96
43342
a6dcac6454c1 packaging: introduce Python3 support as buildrpm --python3
Mads Kiilerich <mads@kiilerich.com>
parents: 43341
diff changeset
    97
export HGPYTHON3=1
a6dcac6454c1 packaging: introduce Python3 support as buildrpm --python3
Mads Kiilerich <mads@kiilerich.com>
parents: 43341
diff changeset
    98
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
    99
%if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   100
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   101
PYPATH=$PWD/%{pythonname}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   102
cd $PYPATH
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   103
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
   104
# 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
   105
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
   106
cd -
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   107
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   108
cd %{docutilsname}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   109
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
   110
cd -
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   111
43341
92a51a45d44c packaging: be explicit about Python version in rpm spec
Mads Kiilerich <mads@kiilerich.com>
parents: 43340
diff changeset
   112
PATH=$PYPATH:$PATH LD_LIBRARY_PATH=$PYPATH make install PYTHON=%{pythonexe} DESTDIR=$RPM_BUILD_ROOT PREFIX=%{hgpyprefix} MANDIR=%{_mandir}
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   113
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
   114
( 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
   115
( 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
   116
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   117
%else
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   118
43341
92a51a45d44c packaging: be explicit about Python version in rpm spec
Mads Kiilerich <mads@kiilerich.com>
parents: 43340
diff changeset
   119
make install PYTHON=%{pythonexe} 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
   120
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   121
%endif
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   122
33679
8fbd56a4073c rpms: add chg
Mathias De Maré <mathias.de_mare@nokia.com>
parents: 32776
diff changeset
   123
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
   124
install -m 755 contrib/hgk $RPM_BUILD_ROOT%{_bindir}/
5337cb17fa1f buildrpm: various minor cleanup
Mads Kiilerich <madski@unity3d.com>
parents: 12056
diff changeset
   125
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
   126
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
   127
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
   128
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
   129
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
   130
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
   131
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
   132
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
   133
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
   134
8942
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
   135
mkdir -p $RPM_BUILD_ROOT%{emacs_lispdir}
21638
5337cb17fa1f buildrpm: various minor cleanup
Mads Kiilerich <madski@unity3d.com>
parents: 12056
diff changeset
   136
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
   137
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
   138
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
   139
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/mercurial/hgrc.d
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
   140
563
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
   141
%clean
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
   142
rm -rf $RPM_BUILD_ROOT
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
   143
563
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
   144
%files
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
   145
%defattr(-,root,root,-)
43343
73d1bbf817cd packaging: also include hgweb.wsgi in rpms
Mads Kiilerich <mads@kiilerich.com>
parents: 43342
diff changeset
   146
%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
   147
%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
   148
%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
   149
%dir %{_datadir}/zsh/
85439f43749f mercurial.spec: specify file modes for install
Mads Kiilerich <mads@kiilerich.com>
parents: 11845
diff changeset
   150
%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
   151
%{_datadir}/zsh/site-functions/_mercurial
12056
85439f43749f mercurial.spec: specify file modes for install
Mads Kiilerich <mads@kiilerich.com>
parents: 11845
diff changeset
   152
%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
   153
%{_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
   154
%{_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
   155
%{_bindir}/hg
33679
8fbd56a4073c rpms: add chg
Mathias De Maré <mathias.de_mare@nokia.com>
parents: 32776
diff changeset
   156
%{_bindir}/chg
4752
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
   157
%{_bindir}/hgk
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
   158
%{_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
   159
%dir %{_sysconfdir}/bash_completion.d/
12056
85439f43749f mercurial.spec: specify file modes for install
Mads Kiilerich <mads@kiilerich.com>
parents: 11845
diff changeset
   160
%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
   161
%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
   162
%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
   163
%if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   164
%{_bindir}/%{pythonhg}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   165
%{hgpyprefix}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
   166
%else
8867
ff817723280a contrib/buildrpm: Support python 2.4 and 2.6
Mads Kiilerich <mads@kiilerich.com>
parents: 7433
diff changeset
   167
%{_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
   168
%{_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
   169
%{_libdir}/python%{pythonver}/site-packages/hgext
28614
b927fe8bf0b9 rpms: add hgext3rd to mercurial.spec
Anton Shestakov <av6@dwimlabs.net>
parents: 26421
diff changeset
   170
%{_libdir}/python%{pythonver}/site-packages/hgext3rd
32776
0f55adb73e14 rpms: add hgdemandimport in files
Toshi MARUYAMA <marutosijp2@gmail.com>
parents: 32775
diff changeset
   171
%{_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
   172
%endif