recipe1 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # Build recipe for tarlz.
  2. #
  3. # Copyright (c) 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=tarlz
  17. version=0.15
  18. release=1
  19. # Set 'outdir' for a nice and well-organized output directory
  20. outdir="${outdir}/${arch}/tools"
  21. tarname=${program}-${version}.tar.lz
  22. # Remote source(s)
  23. fetch=http://download-mirror.savannah.gnu.org/releases/lzip/tarlz/$tarname
  24. homepage=http://lzip.nongnu.org/tarlz.html
  25. license=GPLv2+
  26. description="
  27. Archiver with multimember lzip compression.
  28. Tarlz is a combined implementation of the tar archiver and the lzip
  29. compressor. By default tarlz creates, lists and extracts archives in a
  30. simplified posix pax format compressed with lzip on a per file basis.
  31. Each tar member is compressed in its own lzip member, as well as the
  32. end-of-file blocks. This method adds an indexed lzip layer on top of
  33. the tar archive, making it possible to decode the archive safely in
  34. parallel. The resulting multimember tar.lz archive is fully backward
  35. compatible with standard tar tools like GNU tar, which treat it like
  36. any other tar.lz archive. Tarlz can append files to the end of such
  37. compressed archives.
  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. ./configure CXXFLAGS+="$QICXXFLAGS" LDFLAGS="$QILDFLAGS -static" \
  52. $configure_args \
  53. --infodir=$infodir \
  54. --mandir=$mandir \
  55. --build="$(cc -dumpmachine)"
  56. make -j${jobs}
  57. make -j${jobs} DESTDIR="$destdir" install
  58. # Compress info documents and manual page
  59. rm -f "${destdir}/${infodir}/dir"; # Redundancy
  60. lzip -9 \
  61. "${destdir}/${infodir}/tarlz.info" \
  62. "${destdir}/${mandir}/man1/tarlz.1"
  63. # Copy documentation
  64. mkdir -p "${destdir}${docsdir}"
  65. cp -p $docs "${destdir}${docsdir}"
  66. }