annotate contrib/packaging/mercurial.spec @ 43341:92a51a45d44c stable

packaging: be explicit about Python version in rpm spec Fedora 31 has Python3 at /usr/bin/python ... but expect everybody to not just find python in $PATH but be explicit about whether they want python2 or python3. mercurial.spec just used 'python' and would fail when it unknowingly used Python 3 and ended up with Mercurial setup.py reporting "Python 3.7 detected." and talking about the HGPYTHON3 environment variable. For now, just be explicit about using system python2 as python executable when building rpms.
author Mads Kiilerich <mads@kiilerich.com>
date Sun, 27 Oct 2019 21:40:21 +0100
parents e0812b032bcc
children a6dcac6454c1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
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}
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
9 %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
10 %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
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
43341
92a51a45d44c packaging: be explicit about Python version in rpm spec
Mads Kiilerich <mads@kiilerich.com>
parents: 43340
diff changeset
18 %global pythonexe python2
92a51a45d44c packaging: be explicit about Python version in rpm spec
Mads Kiilerich <mads@kiilerich.com>
parents: 43340
diff changeset
19 %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
20
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
21 %endif
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
22
12056
85439f43749f mercurial.spec: specify file modes for install
Mads Kiilerich <mads@kiilerich.com>
parents: 11845
diff changeset
23 Summary: A fast, lightweight Source Control Management system
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
24 Name: mercurial
3863
1ef8ada4370f Remove hard-coded version numbers and release notes from packaging
Matt Mackall <mpm@selenic.com>
parents: 1891
diff changeset
25 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
26 Release: 0
10263
25e572394f5c Update license to GPLv2+
Matt Mackall <mpm@selenic.com>
parents: 10255
diff changeset
27 License: GPLv2+
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
28 Group: Development/Tools
26421
4b0fc75f9403 urls: bulk-change primary website URLs
Matt Mackall <mpm@selenic.com>
parents: 25008
diff changeset
29 URL: https://mercurial-scm.org/
21641
977e5bd6eb76 buildrpm: include release version in .tar.gz name
Mads Kiilerich <madski@unity3d.com>
parents: 21639
diff changeset
30 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
31 %if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
32 Source1: %{pythonname}.tgz
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
33 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
34 %endif
7424
05a3f2802b13 Fix rpmlint warnings
Mads Kiilerich <mads@kiilerich.com>
parents: 7423
diff changeset
35 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
36
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
37 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
38 %if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
39 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
40 %else
32233
feb910d2f59b setup: drop support for Python 2.6 (BC)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 28614
diff changeset
41 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
42 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
43 %endif
10255
26fc868cb8b0 mercurial.spec: Alignment with AIX spec by Jim Hague
Mads Kiilerich <mads@kiilerich.com>
parents: 9635
diff changeset
44 # 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
45 #Requires: tk
4751
2f2d8c5e7a5c mercurial.spec: add BuildRequires
julian@lava.net
parents: 4750
diff changeset
46
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
47 %description
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
48 Mercurial is a fast, lightweight source control management system designed
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
49 for efficient handling of very large distributed projects.
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
50
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
51 %prep
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
52
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
53 %if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
54 %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
55 # 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
56 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
57 %else
21641
977e5bd6eb76 buildrpm: include release version in .tar.gz name
Mads Kiilerich <madski@unity3d.com>
parents: 21639
diff changeset
58 %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
59 %endif
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
60
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
61 %build
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
62
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
63 %if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
64
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
65 PYPATH=$PWD/%{pythonname}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
66 cd $PYPATH
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
67 ./configure --prefix=%{hgpyprefix}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
68 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
69 cd -
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
70
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
71 cd %{docutilsname}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
72 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
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 # verify Python environment
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 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
77
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
78 # 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
79 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
80 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
81 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
82 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
83
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
84 %endif
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
85
43341
92a51a45d44c packaging: be explicit about Python version in rpm spec
Mads Kiilerich <mads@kiilerich.com>
parents: 43340
diff changeset
86 make all PYTHON=%{pythonexe}
33679
8fbd56a4073c rpms: add chg
Mathias De Maré <mathias.de_mare@nokia.com>
parents: 32776
diff changeset
87 make -C contrib/chg
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
88
43341
92a51a45d44c packaging: be explicit about Python version in rpm spec
Mads Kiilerich <mads@kiilerich.com>
parents: 43340
diff changeset
89 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
90
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
91 %install
7424
05a3f2802b13 Fix rpmlint warnings
Mads Kiilerich <mads@kiilerich.com>
parents: 7423
diff changeset
92 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
93
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
94 %if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
95
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
96 PYPATH=$PWD/%{pythonname}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
97 cd $PYPATH
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
98 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
99 # 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
100 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
101 cd -
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
102
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
103 cd %{docutilsname}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
104 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
105 cd -
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
106
43341
92a51a45d44c packaging: be explicit about Python version in rpm spec
Mads Kiilerich <mads@kiilerich.com>
parents: 43340
diff changeset
107 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
108 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
109 ( 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
110 ( 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
111
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
112 %else
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
113
43341
92a51a45d44c packaging: be explicit about Python version in rpm spec
Mads Kiilerich <mads@kiilerich.com>
parents: 43340
diff changeset
114 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
115
22436
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
116 %endif
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
117
33679
8fbd56a4073c rpms: add chg
Mathias De Maré <mathias.de_mare@nokia.com>
parents: 32776
diff changeset
118 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
119 install -m 755 contrib/hgk $RPM_BUILD_ROOT%{_bindir}/
5337cb17fa1f buildrpm: various minor cleanup
Mads Kiilerich <madski@unity3d.com>
parents: 12056
diff changeset
120 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
121
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
122 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
123 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
124 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
125
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
126 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
127 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
128 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
129
8942
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
130 mkdir -p $RPM_BUILD_ROOT%{emacs_lispdir}
21638
5337cb17fa1f buildrpm: various minor cleanup
Mads Kiilerich <madski@unity3d.com>
parents: 12056
diff changeset
131 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
132 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
133
51038bb526ea Make RPM spec in contrib more aligned with the one from Fedora
Mads Kiilerich <mads@kiilerich.com>
parents: 8936
diff changeset
134 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/mercurial/hgrc.d
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 %clean
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
137 rm -rf $RPM_BUILD_ROOT
459
7c1952b29656 Add an RPM spec file
mpm@selenic.com
parents:
diff changeset
138
563
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
139 %files
42a6a41ab76b [PATCH] clean up RPM spec file
mpm@selenic.com
parents: 459
diff changeset
140 %defattr(-,root,root,-)
10664
9602fc4e6914 mercurial.spec: remove reference to doc/ja
Greg Lindahl <greg@blekko.com>
parents: 10263
diff changeset
141 %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
142 %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
143 %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
144 %dir %{_datadir}/zsh/
85439f43749f mercurial.spec: specify file modes for install
Mads Kiilerich <mads@kiilerich.com>
parents: 11845
diff changeset
145 %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
146 %{_datadir}/zsh/site-functions/_mercurial
12056
85439f43749f mercurial.spec: specify file modes for install
Mads Kiilerich <mads@kiilerich.com>
parents: 11845
diff changeset
147 %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
148 %{_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
149 %{_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
150 %{_bindir}/hg
33679
8fbd56a4073c rpms: add chg
Mathias De Maré <mathias.de_mare@nokia.com>
parents: 32776
diff changeset
151 %{_bindir}/chg
4752
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
152 %{_bindir}/hgk
cc0fb3500dd5 mercurial.spec: include various utility files from contrib/ in rpm
Adam Spiers <hg@adamspiers.org>
parents: 4751
diff changeset
153 %{_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
154 %dir %{_sysconfdir}/bash_completion.d/
12056
85439f43749f mercurial.spec: specify file modes for install
Mads Kiilerich <mads@kiilerich.com>
parents: 11845
diff changeset
155 %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
156 %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
157 %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
158 %if "%{?withpython}"
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
159 %{_bindir}/%{pythonhg}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
160 %{hgpyprefix}
96d95b75a63b buildrpm: introduce --withpython for building rpms that includes Python 2.7
Mads Kiilerich <madski@unity3d.com>
parents: 22385
diff changeset
161 %else
8867
ff817723280a contrib/buildrpm: Support python 2.4 and 2.6
Mads Kiilerich <mads@kiilerich.com>
parents: 7433
diff changeset
162 %{_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
163 %{_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
164 %{_libdir}/python%{pythonver}/site-packages/hgext
28614
b927fe8bf0b9 rpms: add hgext3rd to mercurial.spec
Anton Shestakov <av6@dwimlabs.net>
parents: 26421
diff changeset
165 %{_libdir}/python%{pythonver}/site-packages/hgext3rd
32776
0f55adb73e14 rpms: add hgdemandimport in files
Toshi MARUYAMA <marutosijp2@gmail.com>
parents: 32775
diff changeset
166 %{_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
167 %endif