tailor.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. ##
  2. ## tailor.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package information
  25. Name: tailor
  26. Summary: Version Control System (VCS) Changeset Migration Tool
  27. URL: http://www.darcs.net/DarcsWiki/Tailor
  28. Vendor: Lele Gaifax
  29. Packager: OpenPKG Foundation e.V.
  30. Distribution: OpenPKG Community
  31. Class: EVAL
  32. Group: SCM
  33. License: GPL
  34. Version: 0.9.27
  35. Release: 20070127
  36. # list of sources
  37. Source0: http://darcs.arstecnica.it/tailor-%{version}.tar.gz
  38. Patch0: tailor.patch
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 20060823, python
  43. PreReq: OpenPKG, openpkg >= 20060823, python
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. Tailor is a tool to migrate changesets between the Version Control
  48. Systems (VCS) ArX, Bazaar, Bazaar-NG, CVS, Codeville, Darcs, Git,
  49. Mercurial, Monotone, Subversion and TLA.
  50. %track
  51. prog tailor = {
  52. version = %{version}
  53. url = http://darcs.arstecnica.it/
  54. regex = tailor-(__VER__)\.tar\.gz
  55. }
  56. %prep
  57. %setup -q
  58. %patch -p0
  59. %build
  60. %install
  61. rm -rf $RPM_BUILD_ROOT
  62. %{l_shtool} mkdir -f -p -m 755 \
  63. $RPM_BUILD_ROOT%{l_prefix}/bin \
  64. $RPM_BUILD_ROOT%{l_prefix}/libexec/tailor \
  65. $RPM_BUILD_ROOT%{l_prefix}/lib/tailor \
  66. $RPM_BUILD_ROOT%{l_prefix}/man/cat1 \
  67. $RPM_BUILD_ROOT%{l_prefix}/share/tailor
  68. %{l_shtool} subst \
  69. -e 's;#!/usr/bin/env python;#!%{l_prefix}/bin/python;g' \
  70. tailor
  71. %{l_prefix}/bin/python setup.py install \
  72. --root=$RPM_BUILD_ROOT \
  73. --prefix=%{l_prefix} \
  74. --install-lib=%{l_prefix}/lib/tailor
  75. mv $RPM_BUILD_ROOT%{l_prefix}/bin/tailor \
  76. $RPM_BUILD_ROOT%{l_prefix}/libexec/tailor/tailor
  77. ( echo "#!/bin/sh"
  78. echo "PYTHONPATH=\"%{l_prefix}/lib/tailor\""
  79. echo "export PYTHONPATH"
  80. echo "%{l_prefix}/bin/python %{l_prefix}/libexec/tailor/tailor \${1+\"\$@\"}"
  81. ) >$RPM_BUILD_ROOT%{l_prefix}/bin/tailor
  82. chmod 755 $RPM_BUILD_ROOT%{l_prefix}/bin/tailor
  83. %{l_shtool} install -c -m 644 \
  84. README.html $RPM_BUILD_ROOT%{l_prefix}/share/tailor/tailor.html
  85. %{l_shtool} install -c -m 644 \
  86. README $RPM_BUILD_ROOT%{l_prefix}/man/cat1/tailor.1
  87. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  88. %{l_files_std} \
  89. '%doc %{l_prefix}/share/tailor/tailor.html'
  90. %files -f files
  91. %clean
  92. rm -rf $RPM_BUILD_ROOT