recipe 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # Build recipe for plzip.
  2. #
  3. # Copyright (c) 2017-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=plzip
  17. version=1.7
  18. release=1
  19. # Set 'outdir' for a nice and well-organized output directory
  20. outdir="${outdir}/${arch}/compressors"
  21. tarname=${program}-${version}.tar.lz
  22. # Remote source(s)
  23. fetch=http://download.savannah.gnu.org/releases/lzip/plzip/$tarname
  24. homepage=http://lzip.nongnu.org/plzip.html
  25. license=GPLv2+
  26. description="
  27. A massively parallel lossless data compressor.
  28. Plzip is a massively parallel (multi-threaded) lossless data compressor
  29. based on the lzlib compression library, with a user interface similar
  30. to the one of lzip, bzip2 or gzip.
  31. Plzip can compress/decompress large files on multiprocessor machines
  32. much faster than lzip, at the cost of a slightly reduced compression
  33. ratio (0.4 to 2 percent larger compressed files). Note that the number
  34. of usable threads is limited by file size; on files larger than a
  35. few GB plzip can use hundreds of processors, but on files of only a
  36. few MB plzip is no faster than lzip.
  37. For more information, visit: $homepage
  38. "
  39. # Source documentation
  40. docs="AUTHORS COPYING ChangeLog NEWS README"
  41. docsdir="${docdir}/${program}-${version}"
  42. build()
  43. {
  44. set -e
  45. unpack "${tardir}/$tarname"
  46. cd "$srcdir"
  47. # Set sane permissions
  48. chmod -R u+w,go-w,a+rX-s .
  49. ./configure CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
  50. $configure_args \
  51. --infodir=$infodir \
  52. --mandir=$mandir \
  53. --build="$(cc -dumpmachine)"
  54. make -j${jobs}
  55. make -j${jobs} DESTDIR="$destdir" install
  56. # Compress info documents and manual page
  57. rm -f "${destdir}/${infodir}/dir"; # Redundancy
  58. lzip -9 \
  59. "${destdir}/${infodir}/plzip.info" \
  60. "${destdir}/${mandir}/man1/plzip.1"
  61. # Copy documentation
  62. mkdir -p "${destdir}${docsdir}"
  63. cp -p $docs "${destdir}${docsdir}"
  64. }