mercurial/mercurial.spec

Fri, 15 Oct 2010 18:46:25 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 15 Oct 2010 18:46:25 +0200
changeset 261
4f973c756446
parent 210
322542bb8184
child 269
b93b2c78541a
permissions
-rw-r--r--

Update copyright, file server URL, modify doc and link logic.
Now documentation is installed by default to the correct path,
and QtCreator links against Qt shared libraries instead of Qt
static libraries. This unfortunate change supports Nokia's
unfortunate decision to poorly support static linking in Qt.

michael@210 1 ##
michael@210 2 ## mercurial.spec -- OpenPKG RPM Package Specification
michael@210 3 ## Copyright (c) 2000-2009 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@210 34 Version: 1.3.1
michael@211 35 Release: 20090804
michael@210 36
michael@210 37 # list of sources
michael@210 38 Source0: http://mercurial.selenic.com/release/mercurial-%{version}.tar.gz
michael@210 39
michael@210 40 # build information
michael@210 41 Prefix: %{l_prefix}
michael@210 42 BuildRoot: %{l_buildroot}
michael@210 43 BuildPreReq: OpenPKG, openpkg >= 20060823, python
michael@210 44 PreReq: OpenPKG, openpkg >= 20060823, python
michael@210 45 AutoReq: no
michael@210 46 AutoReqProv: no
michael@210 47
michael@210 48 %description
michael@210 49 Mercurial is a fast, lightweight Source Control Management (SCM)
michael@210 50 system designed for efficient handling of very large distributed
michael@210 51 projects.
michael@210 52
michael@210 53 %track
michael@210 54 prog mercurial = {
michael@210 55 version = %{version}
michael@210 56 url = http://mercurial.selenic.com/release/
michael@210 57 regex = mercurial-(__VER__)\.tar\.gz
michael@210 58 }
michael@210 59
michael@210 60 %prep
michael@210 61 %setup -q
michael@211 62 %{l_shtool} subst \
michael@211 63 -e 's;[Mm]ercurial [Rr]epositories;Repositories List;' \
michael@211 64 templates/*/index.tmpl
michael@211 65 %{l_shtool} subst \
michael@211 66 -e 's;[Mm]ercurial [Rr]epository;Repository Name;' \
michael@211 67 templates/*/footer.tmpl
michael@210 68
michael@210 69 %build
michael@210 70
michael@210 71 %install
michael@210 72 rm -rf $RPM_BUILD_ROOT
michael@210 73 %{l_shtool} mkdir -f -p -m 755 \
michael@210 74 $RPM_BUILD_ROOT%{l_prefix}/bin \
michael@210 75 $RPM_BUILD_ROOT%{l_prefix}/libexec/mercurial \
michael@210 76 $RPM_BUILD_ROOT%{l_prefix}/lib/mercurial \
michael@210 77 $RPM_BUILD_ROOT%{l_prefix}/man/man1 \
michael@210 78 $RPM_BUILD_ROOT%{l_prefix}/man/man5
michael@210 79 %{l_shtool} subst \
michael@210 80 -e 's;#!/usr/bin/env python;#!%{l_prefix}/bin/python;g' \
michael@210 81 hg
michael@210 82 %{l_prefix}/bin/python setup.py install \
michael@210 83 --root=$RPM_BUILD_ROOT \
michael@210 84 --prefix=%{l_prefix} \
michael@210 85 --install-lib=%{l_prefix}/lib/mercurial
michael@210 86 mv $RPM_BUILD_ROOT%{l_prefix}/bin/hg \
michael@210 87 $RPM_BUILD_ROOT%{l_prefix}/libexec/mercurial/hg
michael@210 88 ( echo "#!/bin/sh"
michael@210 89 echo "PYTHONPATH=\"%{l_prefix}/lib/mercurial\""
michael@210 90 echo "export PYTHONPATH"
michael@210 91 echo "%{l_prefix}/bin/python %{l_prefix}/libexec/mercurial/hg \${1+\"\$@\"}"
michael@210 92 ) >$RPM_BUILD_ROOT%{l_prefix}/bin/hg
michael@210 93 chmod 755 $RPM_BUILD_ROOT%{l_prefix}/bin/hg
michael@210 94 %{l_shtool} install -c -m 644 \
michael@210 95 doc/*.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/
michael@210 96 %{l_shtool} install -c -m 644 \
michael@210 97 doc/*.5 $RPM_BUILD_ROOT%{l_prefix}/man/man5/
michael@210 98 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
michael@210 99
michael@210 100 %files -f files
michael@210 101
michael@210 102 %clean
michael@210 103 rm -rf $RPM_BUILD_ROOT
michael@210 104

mercurial