# HG changeset patch # User Michael Schloh von Bennewitz # Date 1328724940 -7200 # Node ID 00bfe519c9d32e8149fb6cc9bc8e50159df646cd # Parent 9d79786fbc64d23d3fc162957cb89cdae55f4f6d Update version, introduce hgweb CGI configuration, correct document installation paths, and properly install and mark configuration files. diff -r 9d79786fbc64 -r 00bfe519c9d3 mercurial/hgweb.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial/hgweb.cfg Wed Feb 08 20:15:40 2012 +0200 @@ -0,0 +1,7 @@ +[web] +baseurl = /hg + +[paths] +repo1 = @l_prefix@/var/mercurial/repo1 +repo2 = @l_prefix@/var/mercurial/repo2 + diff -r 9d79786fbc64 -r 00bfe519c9d3 mercurial/hgweb.cgi --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mercurial/hgweb.cgi Wed Feb 08 20:15:40 2012 +0200 @@ -0,0 +1,16 @@ +#!@l_prefix@/bin/python + +import os +import sys +sys.path.insert(0, "@l_prefix@/lib/mercurial") + +from mercurial import demandimport +demandimport.enable() + +from mercurial.hgweb import hgweb, wsgicgi +if os.getenv('HGWEB_REPO_PATH', '') != '' and os.getenv('HGWEB_REPO_NAME', '') != '': + application = hgweb(os.getenv('HGWEB_REPO_PATH'), os.getenv('HGWEB_REPO_NAME')) +else: + application = hgweb('@l_prefix@/etc/mercurial/hgweb.cfg') +wsgicgi.launch(application) + diff -r 9d79786fbc64 -r 00bfe519c9d3 mercurial/mercurial.spec --- a/mercurial/mercurial.spec Tue Aug 28 18:52:25 2012 +0200 +++ b/mercurial/mercurial.spec Wed Feb 08 20:15:40 2012 +0200 @@ -31,17 +31,21 @@ Class: EVAL Group: SCM License: GPL -Version: 1.6.2 -Release: 20101018 +Version: 2.1 +Release: 20120208 # list of sources Source0: http://mercurial.selenic.com/release/mercurial-%{version}.tar.gz +Source1: hgweb.cgi +Source2: hgweb.cfg # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20100101, python, python::with_bzip2 = yes -PreReq: OpenPKG, openpkg >= 20100101, python, python::with_bzip2 = yes +BuildPreReq: OpenPKG, openpkg >= 20060823, python, python::with_bzip2 = yes +PreReq: OpenPKG, openpkg >= 20060823, python, python::with_bzip2 = yes +AutoReq: no +AutoReqProv: no %description Mercurial is a fast, lightweight Source Control Management (SCM) @@ -52,7 +56,7 @@ prog mercurial = { version = %{version} url = http://mercurial.selenic.com/release/ - regex = mercurial-(__VER__)\.tar\.gz + regex = mercurial-(\d+\.\d+(\.\d+)?)\.tar\.gz } %prep @@ -69,7 +73,9 @@ %install rm -rf $RPM_BUILD_ROOT %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/cgi \ $RPM_BUILD_ROOT%{l_prefix}/bin \ + $RPM_BUILD_ROOT%{l_prefix}/etc/mercurial \ $RPM_BUILD_ROOT%{l_prefix}/libexec/mercurial \ $RPM_BUILD_ROOT%{l_prefix}/lib/mercurial \ $RPM_BUILD_ROOT%{l_prefix}/man/man1 \ @@ -89,11 +95,17 @@ echo "%{l_prefix}/bin/python %{l_prefix}/libexec/mercurial/hg \${1+\"\$@\"}" ) >$RPM_BUILD_ROOT%{l_prefix}/bin/hg chmod 755 $RPM_BUILD_ROOT%{l_prefix}/bin/hg + %{l_shtool} install -c -m 755 %{l_value -s -a} \ + %{SOURCE hgweb.cgi} $RPM_BUILD_ROOT%{l_prefix}/cgi/ + %{l_shtool} install -c -m 644 %{l_value -s -a} \ + %{SOURCE hgweb.cfg} $RPM_BUILD_ROOT%{l_prefix}/etc/mercurial/ %{l_shtool} install -c -m 644 \ - doc/*.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/ + doc/*.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/ %{l_shtool} install -c -m 644 \ - doc/*.5 $RPM_BUILD_ROOT%{l_prefix}/man/man5/ - %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + doc/*.5 $RPM_BUILD_ROOT%{l_prefix}/man/man5/ + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ + %{l_files_std} \ + '%config %{l_prefix}/etc/mercurial/*' %files -f files