recipe 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # Build recipe for plzip.
  2. #
  3. # Copyright (c) 2017-2020 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.8
  20. release=3
  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=http://download.savannah.gnu.org/releases/lzip/plzip/$tarname
  26. homepage=http://lzip.nongnu.org/plzip.html
  27. license=GPLv2+
  28. description="
  29. A massively parallel lossless data compressor.
  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
  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 CXXFLAGS+="$QICXXFLAGS" LDFLAGS="$QILDFLAGS -static" \
  53. $configure_args \
  54. --infodir=$infodir \
  55. --mandir=$mandir \
  56. --build="$(gcc -dumpmachine)"
  57. make -j${jobs}
  58. make -j${jobs} DESTDIR="$destdir" install-as-lzip
  59. # Compress info documents and manual page
  60. rm -f "${destdir}/${infodir}/dir"; # Redundancy
  61. lzip -9 \
  62. "${destdir}/${infodir}/plzip.info" \
  63. "${destdir}/${mandir}/man1/plzip.1"
  64. # Make symlink for compatibility
  65. ln -s plzip.1.lz "${destdir}/${mandir}/man1/lzip.1.lz"
  66. # Copy documentation
  67. mkdir -p "${destdir}${docsdir}"
  68. cp -p $docs "${destdir}${docsdir}"
  69. }