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@269: Version: 1.6.2 michael@269: Release: 20100803 michael@210: michael@210: # list of sources michael@210: Source0: http://mercurial.selenic.com/release/mercurial-%{version}.tar.gz michael@210: michael@210: # build information michael@269: BuildPreReq: OpenPKG, openpkg >= 20100101, python michael@269: PreReq: OpenPKG, openpkg >= 20100101, python 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@210: regex = mercurial-(__VER__)\.tar\.gz michael@210: } michael@210: michael@210: %prep michael@210: %setup -q michael@210: michael@210: %build michael@210: michael@210: %install michael@210: %{l_shtool} mkdir -f -p -m 755 \ michael@210: $RPM_BUILD_ROOT%{l_prefix}/bin \ 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@210: %{l_shtool} install -c -m 644 \ michael@210: doc/*.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/ michael@210: %{l_shtool} install -c -m 644 \ michael@210: doc/*.5 $RPM_BUILD_ROOT%{l_prefix}/man/man5/ michael@210: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} michael@210: michael@210: %files -f files michael@210: michael@210: %clean michael@210: