recipe1 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # Build recipe for tarlz.
  2. #
  3. # Copyright (c) 2019-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=tarlz
  19. version=0.22
  20. release=2
  21. # Define a category for the output of the package name
  22. pkgcategory=tools
  23. tarname=${program}-${version}.tar.lz
  24. # Remote source(s)
  25. fetch=https://download-mirror.savannah.gnu.org/releases/lzip/tarlz/$tarname
  26. homepage=https://lzip.nongnu.org/tarlz.html
  27. license=GPLv2+
  28. description="
  29. Archiver with multimember lzip compression (version $version).
  30. Tarlz is a combined implementation of the tar archiver and the lzip
  31. compressor. By default tarlz creates, lists and extracts archives in a
  32. simplified posix pax format compressed with lzip on a per file basis.
  33. Each tar member is compressed in its own lzip member, as well as the
  34. end-of-file blocks. This method adds an indexed lzip layer on top of
  35. the tar archive, making it possible to decode the archive safely in
  36. parallel. The resulting multimember tar.lz archive is fully backward
  37. compatible with standard tar tools like GNU tar, which treat it like
  38. any other tar.lz archive. Tarlz can append files to the end of such
  39. compressed archives.
  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
  60. # Compress info documents and manual page
  61. rm -f "${destdir}/${infodir}/dir"; # Redundancy
  62. lzip -9 \
  63. "${destdir}/${infodir}/tarlz.info" \
  64. "${destdir}/${mandir}/man1/tarlz.1"
  65. # Copy documentation
  66. mkdir -p "${destdir}/$docsdir"
  67. cp -p $docs "${destdir}/$docsdir"
  68. }