michael@210: ## michael@210: ## mercurial.spec -- OpenPKG RPM Package Specification michael@269: ## Copyright (c) 2000-2010 OpenPKG Foundation e.V. michael@210: ## michael@210: ## Permission to use, copy, modify, and distribute this software for michael@210: ## any purpose with or without fee is hereby granted, provided that michael@210: ## the above copyright notice and this permission notice appear in all michael@210: ## copies. michael@210: ## michael@210: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@210: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@210: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@210: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@210: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@210: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@210: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@210: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@210: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@210: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@210: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@210: ## SUCH DAMAGE. michael@210: ## michael@210: michael@210: # package information michael@210: Name: mercurial michael@210: Summary: Disributed Version Control System michael@210: URL: http://selenic.com/mercurial/ michael@210: Vendor: Matt Mackall et al. michael@210: Packager: OpenPKG Foundation e.V. michael@210: Distribution: OpenPKG Community michael@210: Class: EVAL michael@210: Group: SCM michael@210: License: GPL michael@601: Version: 2.3 michael@601: Release: 20120800 michael@210: michael@210: # list of sources michael@210: Source0: http://mercurial.selenic.com/release/mercurial-%{version}.tar.gz michael@600: Source1: hgweb.cgi michael@600: Source2: hgweb.cfg michael@210: michael@210: # build information michael@600: BuildPreReq: OpenPKG, openpkg >= 20060823, python, python::with_bzip2 = yes michael@600: PreReq: OpenPKG, openpkg >= 20060823, python, python::with_bzip2 = yes michael@210: michael@210: %description michael@210: Mercurial is a fast, lightweight Source Control Management (SCM) michael@210: system designed for efficient handling of very large distributed michael@210: projects. michael@210: michael@210: %track michael@210: prog mercurial = { michael@210: version = %{version} michael@210: url = http://mercurial.selenic.com/release/ michael@600: regex = mercurial-(\d+\.\d+(\.\d+)?)\.tar\.gz michael@210: } michael@210: michael@210: %prep michael@210: %setup -q michael@270: %{l_shtool} subst \ michael@270: -e 's;[Mm]ercurial [Rr]epositories;Repositories List;' \ michael@270: templates/*/index.tmpl michael@270: %{l_shtool} subst \ michael@270: -e 's;[Mm]ercurial [Rr]epository;Repository Name;' \ michael@270: templates/*/footer.tmpl michael@210: michael@210: %build michael@210: michael@210: %install michael@210: %{l_shtool} mkdir -f -p -m 755 \ michael@600: $RPM_BUILD_ROOT%{l_prefix}/cgi \ michael@210: $RPM_BUILD_ROOT%{l_prefix}/bin \ michael@600: $RPM_BUILD_ROOT%{l_prefix}/etc/mercurial \ michael@210: $RPM_BUILD_ROOT%{l_prefix}/libexec/mercurial \ michael@210: $RPM_BUILD_ROOT%{l_prefix}/lib/mercurial \ michael@210: $RPM_BUILD_ROOT%{l_prefix}/man/man1 \ michael@210: $RPM_BUILD_ROOT%{l_prefix}/man/man5 michael@210: %{l_shtool} subst \ michael@210: -e 's;#!/usr/bin/env python;#!%{l_prefix}/bin/python;g' \ michael@210: hg michael@210: %{l_prefix}/bin/python setup.py install \ michael@210: --root=$RPM_BUILD_ROOT \ michael@210: --prefix=%{l_prefix} \ michael@210: --install-lib=%{l_prefix}/lib/mercurial michael@210: mv $RPM_BUILD_ROOT%{l_prefix}/bin/hg \ michael@210: $RPM_BUILD_ROOT%{l_prefix}/libexec/mercurial/hg michael@210: ( echo "#!/bin/sh" michael@210: echo "PYTHONPATH=\"%{l_prefix}/lib/mercurial\"" michael@210: echo "export PYTHONPATH" michael@210: echo "%{l_prefix}/bin/python %{l_prefix}/libexec/mercurial/hg \${1+\"\$@\"}" michael@210: ) >$RPM_BUILD_ROOT%{l_prefix}/bin/hg michael@210: chmod 755 $RPM_BUILD_ROOT%{l_prefix}/bin/hg michael@600: %{l_shtool} install -c -m 755 %{l_value -s -a} \ michael@600: %{SOURCE hgweb.cgi} $RPM_BUILD_ROOT%{l_prefix}/cgi/ michael@600: %{l_shtool} install -c -m 644 %{l_value -s -a} \ michael@600: %{SOURCE hgweb.cfg} $RPM_BUILD_ROOT%{l_prefix}/etc/mercurial/ michael@210: %{l_shtool} install -c -m 644 \ michael@600: doc/*.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/ michael@210: %{l_shtool} install -c -m 644 \ michael@600: doc/*.5 $RPM_BUILD_ROOT%{l_prefix}/man/man5/ michael@600: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ michael@600: %{l_files_std} \ michael@600: '%config %{l_prefix}/etc/mercurial/*' michael@210: michael@210: %files -f files michael@210: michael@210: %clean michael@210: