recipe 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. # Build recipe for plzip.
  2. #
  3. # Copyright (c) 2017-2022 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. # Exit immediately on any error
  17. set -e
  18. program=plzip
  19. version=1.10
  20. release=2
  21. # Define a category for the output of the package name
  22. pkgcategory=compressors
  23. tarname=${program}-${version}.tar.lz
  24. # Remote source(s)
  25. fetch=https://download.savannah.gnu.org/releases/lzip/plzip/$tarname
  26. homepage=https://lzip.nongnu.org/plzip.html
  27. license=GPLv2+
  28. description="
  29. A massively parallel lossless data compressor (version $version).
  30. Plzip is a massively parallel (multi-threaded) lossless data compressor
  31. based on the lzlib compression library, with a user interface similar
  32. to the one of lzip, bzip2 or gzip.
  33. Plzip can compress/decompress large files on multiprocessor machines
  34. much faster than lzip, at the cost of a slightly reduced compression
  35. ratio (0.4 to 2 percent larger compressed files). Note that the number
  36. of usable threads is limited by file size; on files larger than a
  37. few GB plzip can use hundreds of processors, but on files of only a
  38. few MB plzip is no faster than lzip.
  39. Plzip is the default version of Lzip used in Dragora as the main 'lzip'.
  40. "
  41. # Limit package name to the program name
  42. full_pkgname="${program}@${pkgcategory}"
  43. # Source documentation
  44. docs="AUTHORS COPYING ChangeLog NEWS README"
  45. docsdir="${docdir}/${program}"
  46. build()
  47. {
  48. unpack "${tardir}/$tarname"
  49. cd "$srcdir"
  50. # Set sane permissions
  51. chmod -R u+w,go-w,a+rX-s .
  52. ./configure CPPFLAGS="$QICPPFLAGS" \
  53. CXXFLAGS+="$QICXXFLAGS" LDFLAGS="$QILDFLAGS -static" \
  54. $configure_args \
  55. --infodir=$infodir \
  56. --mandir=$mandir \
  57. --build="$(gcc -dumpmachine)"
  58. make -j${jobs} V=1
  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. }