recipe 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. # Build recipe for xz.
  2. #
  3. # Copyright (c) 2016-2019 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=xz
  17. version=5.2.4
  18. release=2
  19. # Set 'outdir' for a nice and well-organized output directory
  20. outdir="${outdir}/${arch}/compressors"
  21. tarname=${program}-${version}.tar.bz2
  22. # Remote source(s)
  23. fetch=http://tukaani.org/xz/$tarname
  24. description="
  25. A (complex) compression utility based on the LZMA algorithm.
  26. XZ Utils is free general-purpose data compression software with a high
  27. compression ratio. XZ Utils were written for POSIX-like systems, but
  28. also work on some not-so-POSIX systems.
  29. WARNING:
  30. The usage of this utility to distribute files or backup your data
  31. IS TOTALLY DISCOURAGED. Limit its usage to decompression only,
  32. since some maintainers refuse to distribute in a better format.
  33. For more information, see http://lzip.nongnu.org/xz_inadequate.html
  34. It is highly recommended the use of lzip(1) instead of xz(1).
  35. "
  36. homepage=http://tukaani.org/xz
  37. license=GPLv2+
  38. # Source documentation
  39. docsdir="${docdir}/${program}-${version}"
  40. build()
  41. {
  42. set -e
  43. unpack "${tardir}/$tarname"
  44. cd "$srcdir"
  45. # Set sane permissions
  46. chmod -R u+w,go-w,a+rX-s .
  47. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  48. $configure_args \
  49. --libdir=/usr/lib${libSuffix} \
  50. --mandir=$mandir \
  51. --docdir=$docsdir \
  52. --enable-static=no \
  53. --enable-shared=yes \
  54. --disable-rpath \
  55. --disable-lzmadec \
  56. --disable-lzmainfo \
  57. --disable-lzma-links \
  58. --build="$(cc -dumpmachine)"
  59. make -j${jobs} V=1
  60. make -j${jobs} DESTDIR="$destdir" install-strip
  61. # Compress and link man pages (if needed)
  62. if test -d "${destdir}/$mandir"
  63. then
  64. (
  65. cd "${destdir}/$mandir"
  66. find . -type f -exec lzip -9 '{}' +
  67. find . -type l | while read -r file
  68. do
  69. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  70. rm -- "$file"
  71. done
  72. )
  73. fi
  74. }