bazaar.spec 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. ##
  2. ## bazaar.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package version
  24. %define V_bzr_major 1.6
  25. %define V_bzr_minor 1
  26. %define V_bzrtools 1.6.0
  27. # package information
  28. Name: bazaar
  29. Summary: Version Control System
  30. URL: http://bazaar-vcs.org/
  31. Vendor: Canonical Ltd
  32. Packager: OpenPKG Foundation e.V.
  33. Distribution: OpenPKG Community
  34. Class: EVAL
  35. Group: SCM
  36. License: GPL
  37. Version: %{V_bzr_major}.%{V_bzr_minor}
  38. Release: 20080909
  39. # list of sources
  40. Source0: http://launchpad.net/bzr/%{V_bzr_major}/%{V_bzr_major}.%{V_bzr_minor}/+download/bzr-%{V_bzr_major}.%{V_bzr_minor}.tar.gz
  41. Source1: http://launchpad.net/bzrtools/trunk/%{V_bzrtools}/+download/bzrtools-%{V_bzrtools}.tar.gz
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20060823, python
  46. PreReq: OpenPKG, openpkg >= 20060823, python
  47. AutoReq: no
  48. AutoReqProv: no
  49. %description
  50. Bazaar is a distributed version control system that aids open
  51. source development and reduces barriers to participation. The
  52. priorities are to be safe, friendly, free and fast. Bazaar gives
  53. fast, distributed revision control that "Just Works", supporting
  54. renames of files and directories smoothly. Bazaar is designed to
  55. maximise the level of community participation in your project.
  56. Bazaar branches can be hosted on any web server, and uploaded
  57. over sftp, ftp, or rsync. Bazaar supports flexible work models:
  58. centralized like cvs(1) or svn(1), commit offline, enforced code
  59. review when desired, and automatic regression testing. Decentralized
  60. revision control systems give people the ability to collaborate more
  61. efficiently over the internet using the bazaar development model.
  62. When you use Bazaar, you can commit to your own local branches
  63. of your favorite free software projects without needing special
  64. permission.
  65. %track
  66. prog bazaar:bzr = {
  67. version = %{V_bzr_major}.%{V_bzr_minor}
  68. url = http://bazaar-vcs.org/Download
  69. regex = bzr-(\d+(\.\d+)+)\.tar\.gz
  70. }
  71. prog bazaar:bzrtools = {
  72. version = %{V_bzrtools}
  73. url = http://bazaar-vcs.org/BzrTools
  74. regex = bzrtools-(__VER__)\.tar\.gz
  75. }
  76. %prep
  77. %setup -q -c
  78. %setup -q -D -T -a 1
  79. %build
  80. %install
  81. rm -rf $RPM_BUILD_ROOT
  82. %{l_shtool} mkdir -f -p -m 755 \
  83. $RPM_BUILD_ROOT%{l_prefix}/bin \
  84. $RPM_BUILD_ROOT%{l_prefix}/libexec/bazaar \
  85. $RPM_BUILD_ROOT%{l_prefix}/lib/bazaar
  86. ( cd bzr-%{V_bzr_major}.%{V_bzr_minor}
  87. %{l_shtool} subst \
  88. -e 's;#! /usr/bin/env python;#!%{l_prefix}/bin/python;g' \
  89. bzr
  90. %{l_prefix}/bin/python setup.py install \
  91. --root=$RPM_BUILD_ROOT \
  92. --prefix=%{l_prefix} \
  93. --install-lib=%{l_prefix}/lib/bazaar
  94. ) || exit $?
  95. ( cd bzrtools
  96. %{l_prefix}/bin/python setup.py install \
  97. --root=$RPM_BUILD_ROOT \
  98. --prefix=%{l_prefix} \
  99. --install-lib=%{l_prefix}/lib/bazaar
  100. ) || exit $?
  101. mv $RPM_BUILD_ROOT%{l_prefix}/bin/bzr \
  102. $RPM_BUILD_ROOT%{l_prefix}/libexec/bazaar/bzr
  103. ( echo "#!/bin/sh"
  104. echo "PYTHONPATH=\"%{l_prefix}/lib/bazaar\""
  105. echo "export PYTHONPATH"
  106. echo "%{l_prefix}/bin/python %{l_prefix}/libexec/bazaar/bzr \${1+\"\$@\"}"
  107. ) >$RPM_BUILD_ROOT%{l_prefix}/bin/bzr
  108. chmod 755 $RPM_BUILD_ROOT%{l_prefix}/bin/bzr
  109. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  110. %files -f files
  111. %clean
  112. rm -rf $RPM_BUILD_ROOT