Mon, 28 Jan 2013 17:37:18 +0100
Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.
michael@210 | 1 | ## |
michael@210 | 2 | ## mercurial.spec -- OpenPKG RPM Package Specification |
michael@269 | 3 | ## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/> |
michael@210 | 4 | ## |
michael@210 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@210 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@210 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@210 | 8 | ## copies. |
michael@210 | 9 | ## |
michael@210 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@210 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@210 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@210 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@210 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@210 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@210 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@210 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@210 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@210 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@210 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@210 | 21 | ## SUCH DAMAGE. |
michael@210 | 22 | ## |
michael@210 | 23 | |
michael@210 | 24 | # package information |
michael@210 | 25 | Name: mercurial |
michael@210 | 26 | Summary: Disributed Version Control System |
michael@210 | 27 | URL: http://selenic.com/mercurial/ |
michael@210 | 28 | Vendor: Matt Mackall et al. |
michael@210 | 29 | Packager: OpenPKG Foundation e.V. |
michael@210 | 30 | Distribution: OpenPKG Community |
michael@210 | 31 | Class: EVAL |
michael@210 | 32 | Group: SCM |
michael@210 | 33 | License: GPL |
michael@601 | 34 | Version: 2.3 |
michael@601 | 35 | Release: 20120800 |
michael@210 | 36 | |
michael@210 | 37 | # list of sources |
michael@210 | 38 | Source0: http://mercurial.selenic.com/release/mercurial-%{version}.tar.gz |
michael@600 | 39 | Source1: hgweb.cgi |
michael@600 | 40 | Source2: hgweb.cfg |
michael@210 | 41 | |
michael@210 | 42 | # build information |
michael@600 | 43 | BuildPreReq: OpenPKG, openpkg >= 20060823, python, python::with_bzip2 = yes |
michael@600 | 44 | PreReq: OpenPKG, openpkg >= 20060823, python, python::with_bzip2 = yes |
michael@210 | 45 | |
michael@210 | 46 | %description |
michael@210 | 47 | Mercurial is a fast, lightweight Source Control Management (SCM) |
michael@210 | 48 | system designed for efficient handling of very large distributed |
michael@210 | 49 | projects. |
michael@210 | 50 | |
michael@210 | 51 | %track |
michael@210 | 52 | prog mercurial = { |
michael@210 | 53 | version = %{version} |
michael@210 | 54 | url = http://mercurial.selenic.com/release/ |
michael@600 | 55 | regex = mercurial-(\d+\.\d+(\.\d+)?)\.tar\.gz |
michael@210 | 56 | } |
michael@210 | 57 | |
michael@210 | 58 | %prep |
michael@210 | 59 | %setup -q |
michael@270 | 60 | %{l_shtool} subst \ |
michael@270 | 61 | -e 's;[Mm]ercurial [Rr]epositories;Repositories List;' \ |
michael@270 | 62 | templates/*/index.tmpl |
michael@270 | 63 | %{l_shtool} subst \ |
michael@270 | 64 | -e 's;[Mm]ercurial [Rr]epository;Repository Name;' \ |
michael@270 | 65 | templates/*/footer.tmpl |
michael@210 | 66 | |
michael@210 | 67 | %build |
michael@210 | 68 | |
michael@210 | 69 | %install |
michael@210 | 70 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@600 | 71 | $RPM_BUILD_ROOT%{l_prefix}/cgi \ |
michael@210 | 72 | $RPM_BUILD_ROOT%{l_prefix}/bin \ |
michael@600 | 73 | $RPM_BUILD_ROOT%{l_prefix}/etc/mercurial \ |
michael@210 | 74 | $RPM_BUILD_ROOT%{l_prefix}/libexec/mercurial \ |
michael@210 | 75 | $RPM_BUILD_ROOT%{l_prefix}/lib/mercurial \ |
michael@210 | 76 | $RPM_BUILD_ROOT%{l_prefix}/man/man1 \ |
michael@210 | 77 | $RPM_BUILD_ROOT%{l_prefix}/man/man5 |
michael@210 | 78 | %{l_shtool} subst \ |
michael@210 | 79 | -e 's;#!/usr/bin/env python;#!%{l_prefix}/bin/python;g' \ |
michael@210 | 80 | hg |
michael@210 | 81 | %{l_prefix}/bin/python setup.py install \ |
michael@210 | 82 | --root=$RPM_BUILD_ROOT \ |
michael@210 | 83 | --prefix=%{l_prefix} \ |
michael@210 | 84 | --install-lib=%{l_prefix}/lib/mercurial |
michael@210 | 85 | mv $RPM_BUILD_ROOT%{l_prefix}/bin/hg \ |
michael@210 | 86 | $RPM_BUILD_ROOT%{l_prefix}/libexec/mercurial/hg |
michael@210 | 87 | ( echo "#!/bin/sh" |
michael@210 | 88 | echo "PYTHONPATH=\"%{l_prefix}/lib/mercurial\"" |
michael@210 | 89 | echo "export PYTHONPATH" |
michael@210 | 90 | echo "%{l_prefix}/bin/python %{l_prefix}/libexec/mercurial/hg \${1+\"\$@\"}" |
michael@210 | 91 | ) >$RPM_BUILD_ROOT%{l_prefix}/bin/hg |
michael@210 | 92 | chmod 755 $RPM_BUILD_ROOT%{l_prefix}/bin/hg |
michael@600 | 93 | %{l_shtool} install -c -m 755 %{l_value -s -a} \ |
michael@600 | 94 | %{SOURCE hgweb.cgi} $RPM_BUILD_ROOT%{l_prefix}/cgi/ |
michael@600 | 95 | %{l_shtool} install -c -m 644 %{l_value -s -a} \ |
michael@600 | 96 | %{SOURCE hgweb.cfg} $RPM_BUILD_ROOT%{l_prefix}/etc/mercurial/ |
michael@210 | 97 | %{l_shtool} install -c -m 644 \ |
michael@600 | 98 | doc/*.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/ |
michael@210 | 99 | %{l_shtool} install -c -m 644 \ |
michael@600 | 100 | doc/*.5 $RPM_BUILD_ROOT%{l_prefix}/man/man5/ |
michael@600 | 101 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
michael@600 | 102 | %{l_files_std} \ |
michael@600 | 103 | '%config %{l_prefix}/etc/mercurial/*' |
michael@210 | 104 | |
michael@210 | 105 | %files -f files |
michael@210 | 106 | |
michael@210 | 107 | %clean |
michael@210 | 108 |