recipe 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. # Build recipe for plzip.
  2. #
  3. # Copyright (c) 2017-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=plzip
  17. version=1.8
  18. release=2
  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. Plzip is the default version of Lzip used in Dragora as the main 'lzip'.
  38. "
  39. # Limit package name to the program name
  40. full_pkgname=$program
  41. # Source documentation
  42. docs="AUTHORS COPYING ChangeLog NEWS README"
  43. docsdir="${docdir}/${program}"
  44. build()
  45. {
  46. set -e
  47. unpack "${tardir}/$tarname"
  48. cd "$srcdir"
  49. # Set sane permissions
  50. chmod -R u+w,go-w,a+rX-s .
  51. # Remove default opt level (-Os) to leave the default -O2
  52. ./configure CXXFLAGS+="$(echo $QICXXFLAGS | sed 's/\-Os//')" \
  53. LDFLAGS="$QILDFLAGS -static" \
  54. $configure_args \
  55. --infodir=$infodir \
  56. --mandir=$mandir \
  57. --build="$(cc -dumpmachine)"
  58. make -j${jobs}
  59. make -j${jobs} DESTDIR="$destdir" install-as-lzip
  60. # Compress info documents and manual page
  61. rm -f "${destdir}/${infodir}/dir"; # Redundancy
  62. lzip -9 \
  63. "${destdir}/${infodir}/plzip.info" \
  64. "${destdir}/${mandir}/man1/plzip.1"
  65. # Make symlink for compatibility
  66. ln -s plzip.1.lz "${destdir}/${mandir}/man1/lzip.1.lz"
  67. # Copy documentation
  68. mkdir -p "${destdir}${docsdir}"
  69. cp -p $docs "${destdir}${docsdir}"
  70. }