git.spec 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. ##
  2. ## git.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2006 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 version
  25. %define V_git 1.4.3
  26. %define V_cogito 0.18.1
  27. %define V_stgit 0.10
  28. # package information
  29. Name: git
  30. Summary: Distributed Version Control System
  31. URL: http://git.or.cz/
  32. Vendor: Linus Torvalds, Junio C Hamano
  33. Packager: OpenPKG Foundation e.V.
  34. Distribution: OpenPKG Community
  35. Class: EVAL
  36. Group: SCM
  37. License: GPL
  38. Version: %{V_git}
  39. Release: 20061019
  40. # list of sources
  41. Source0: http://www.kernel.org/pub/software/scm/git/git-%{V_git}.tar.gz
  42. Source1: http://www.kernel.org/pub/software/scm/cogito/cogito-%{V_cogito}.tar.gz
  43. Source2: http://homepage.ntlworld.com/cmarinas/stgit/stgit-%{V_stgit}.tar.gz
  44. Patch0: git.patch
  45. # build information
  46. Prefix: %{l_prefix}
  47. BuildRoot: %{l_buildroot}
  48. BuildPreReq: OpenPKG, openpkg >= 20040130, bash, python, gcc, make
  49. PreReq: OpenPKG, openpkg >= 20040130, bash, python, diffutils, rcs, perl
  50. BuildPreReq: zlib, openssl, curl, expat, libiconv
  51. PreReq: zlib, openssl, curl, expat, libiconv
  52. AutoReq: no
  53. AutoReqProv: no
  54. %description
  55. GIT is a "directory content manager" designed to handle absolutely
  56. massive projects with speed and efficiency. GIT falls in the
  57. category of distributed source code management tools. Every GIT
  58. working directory is a full-fledged repository with full revision
  59. tracking capabilities, not dependent on network access to a central
  60. server.
  61. This package contains both the low-level GIT core components and the
  62. high-level GIT frontends Cogito and StGIT.
  63. %track
  64. prog git:git = {
  65. version = %{V_git}
  66. url = http://www.kernel.org/pub/software/scm/git/
  67. regex = git-(__VER__)\.tar\.gz
  68. }
  69. prog git:cogito = {
  70. version = %{V_cogito}
  71. url = http://www.kernel.org/pub/software/scm/cogito/
  72. regex = cogito-(__VER__)\.tar\.gz
  73. }
  74. prog git:stgit = {
  75. version = %{V_stgit}
  76. url = http://homepage.ntlworld.com/cmarinas/stgit/
  77. regex = stgit-(__VER__)\.tar\.gz
  78. }
  79. %prep
  80. %setup -q -c
  81. %setup -q -T -D -a 1
  82. %setup -q -T -D -a 2
  83. %patch -p0 -d git-%{V_git}
  84. %build
  85. ( cd git-%{V_git}
  86. libs="-liconv"
  87. case "%{l_platform -t}" in
  88. *-linux* ) libs="$libs -ldl" ;;
  89. esac
  90. ( echo "CC := %{l_cc}"
  91. echo "ALL_CFLAGS := %{l_cflags -O} %{l_cppflags} \$(ALL_CFLAGS)"
  92. echo "ALL_LDFLAGS := %{l_ldflags} \$(ALL_LDFLAGS) $libs"
  93. echo "INSTALL = %{l_shtool} install -c"
  94. echo "TAR = %{l_tar}"
  95. echo "CURLDIR = %{l_prefix}"
  96. echo "OPENSSLDIR = %{l_prefix}"
  97. echo "SHELL_PATH = %{l_prefix}/bin/bash"
  98. echo "PERL_PATH = %{l_prefix}/bin/perl"
  99. echo "PYTHON_PATH = %{l_prefix}/bin/python"
  100. echo "prefix = %{l_prefix}"
  101. ) >config.mak
  102. %{l_make} %{l_mflags}
  103. ) || exit $?
  104. ( cd cogito-%{V_cogito}
  105. %{l_make} %{l_mflags} \
  106. prefix=%{l_prefix}
  107. ) || exit $?
  108. %install
  109. rm -rf $RPM_BUILD_ROOT
  110. ( cd git-%{V_git}
  111. %{l_make} %{l_mflags} install \
  112. DESTDIR=$RPM_BUILD_ROOT
  113. ) || exit $?
  114. ( cd cogito-%{V_cogito}
  115. %{l_make} %{l_mflags} install \
  116. INSTALL="%{l_shtool} install" \
  117. DESTDIR=$RPM_BUILD_ROOT \
  118. prefix=%{l_prefix}
  119. ) || exit $?
  120. ( cd stgit-%{V_stgit}
  121. %{l_prefix}/bin/python setup.py install \
  122. --root=$RPM_BUILD_ROOT \
  123. --prefix=%{l_prefix}
  124. ) || exit $?
  125. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  126. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  127. %files -f files
  128. %clean
  129. rm -rf $RPM_BUILD_ROOT