libgit2.spec 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. ##
  2. ## libgit2.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2016 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 information
  24. Name: libgit2
  25. Summary: Reentrant Git Client Library
  26. URL: http://libgit2.github.com/
  27. Vendor: Git Community
  28. Packager: OpenPKG Foundation e.V.
  29. Distribution: OpenPKG Community
  30. Class: EVAL
  31. Group: SCM
  32. License: LGPL
  33. Version: 0.24.2
  34. Release: 20161003
  35. # list of sources
  36. Source0: https://github.com/libgit2/libgit2/archive/v%{version}.tar.gz
  37. # build information
  38. BuildPreReq: OpenPKG, openpkg >= 20160101, cmake
  39. PreReq: OpenPKG, openpkg >= 20160101
  40. %description
  41. libgit2 is a portable, pure C implementation of the Git core methods
  42. provided as a re-entrant linkable library with a solid API, allowing
  43. you to write native speed custom Git applications in any language
  44. which supports C bindings.
  45. %track
  46. prog libgit2 = {
  47. version = %{version}
  48. url = https://github.com/libgit2/libgit2/releases
  49. regex = v(\d+\.\d+\.\d+)\.tar\.gz
  50. }
  51. %prep
  52. %setup -q
  53. %build
  54. mkdir build
  55. cd build
  56. cmake \
  57. -DCMAKE_C_COMPILER=%{l_cc} \
  58. -DCMAKE_INSTALL_PREFIX=%{l_prefix} \
  59. -DCMAKE_BUILD_TYPE=Release \
  60. -DBUILD_SHARED_LIBS=OFF \
  61. -DTHREADSAFE=ON \
  62. -DBUILD_CLAR=OFF \
  63. -DTAGS=OFF \
  64. -DPROFILE=OFF \
  65. ..
  66. cmake --build .
  67. %install
  68. %{l_shtool} mkdir -f -p -m 755 \
  69. $RPM_BUILD_ROOT%{l_prefix}/bin \
  70. $RPM_BUILD_ROOT%{l_prefix}/include/git2 \
  71. $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig
  72. %{l_shtool} install -c -m 644 \
  73. build/libgit2.a $RPM_BUILD_ROOT%{l_prefix}/lib/
  74. %{l_shtool} install -c -m 644 \
  75. build/libgit2.pc $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/
  76. %{l_shtool} install -c -m 644 \
  77. include/*.h $RPM_BUILD_ROOT%{l_prefix}/include/
  78. %{l_shtool} install -c -m 644 \
  79. include/git2/*.h $RPM_BUILD_ROOT%{l_prefix}/include/git2/
  80. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  81. %files -f files
  82. %clean