recipe 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Build recipe for ninja.
  2. #
  3. # Copyright (c) 2018 Matias Fonzo, <selk@dragora.org>.
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. program=ninja
  17. version=1.8.2
  18. release=1
  19. tarname=${program}-${version}.tar.gz
  20. # Remote source(s)
  21. fetch=https://github.com/ninja-build/ninja/archive/v${version}/$tarname
  22. description="
  23. A small build system with a focus on speed.
  24. Ninja is a small build system with a focus on speed. It differs from
  25. other build systems in two major respects: it is designed to have its
  26. input files generated by a higher-level build system, and it is
  27. designed to run builds as fast as possible.
  28. "
  29. homepage=http://ninja-build.org
  30. license="Apache License v2.0"
  31. # Source documentation
  32. docs="COPYING HACKING.md doc/manual.asciidoc"
  33. docsdir="${docdir}/${program}-${version}"
  34. build()
  35. {
  36. set -e
  37. unpack "${tardir}/$tarname"
  38. cd "$srcdir"
  39. python3 configure.py --bootstrap
  40. # Run tests
  41. #./ninja ninja_test
  42. #./ninja_test --gtest_filter=-SubprocessTest.SetWithLots
  43. mkdir -p "${destdir}/usr/bin"
  44. cp -p ninja "${destdir}/usr/bin/"
  45. chmod 755 "${destdir}/usr/bin/ninja"
  46. strip --strip-unneeded "${destdir}/usr/bin/ninja"
  47. # Copy documentation
  48. mkdir -p "${destdir}${docsdir}"
  49. cp -p $docs "${destdir}${docsdir}"
  50. }