recipe 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # Build recipe for clzip.
  2. #
  3. # Copyright (c) 2016-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=clzip
  17. version=1.11
  18. release=1
  19. # Set 'outdir' for a nice and well-organized output directory
  20. outdir="${outdir}/${arch}/compressors"
  21. tarname=${program}-${version}.tar.gz
  22. # Remote source(s)
  23. fetch=http://download.savannah.gnu.org/releases/lzip/clzip/$tarname
  24. description="
  25. C version of the high-quality data compressor Lzip.
  26. Clzip is a lossless data compressor with a user interface similar to
  27. the one of gzip or bzip2. Clzip is about as fast as gzip, compresses
  28. most files more than bzip2, and is better than both from a data
  29. recovery perspective.
  30. Clzip uses the lzip file format; the files produced by clzip are fully
  31. compatible with lzip-1.4 or newer, and can be rescued with lziprecover.
  32. Clzip is in fact a C language version of lzip, intended for embedded
  33. devices or systems lacking a C++ compiler.
  34. "
  35. homepage=http://lzip.nongnu.org/clzip.html
  36. license=GPLv2+
  37. # Source documentation
  38. docs="AUTHORS COPYING ChangeLog NEWS README"
  39. docsdir="${docdir}/${program}-${version}"
  40. build()
  41. {
  42. set -e
  43. unpack "${tardir}/$tarname"
  44. cd "$srcdir"
  45. # Set sane permissions
  46. chmod -R u+w,go-w,a+rX-s .
  47. ./configure CFLAGS+="$QICFLAGS" LDFLAGS="$QILDFLAGS -static" \
  48. $configure_args \
  49. --infodir=$infodir \
  50. --mandir=$mandir \
  51. --build="$(cc -dumpmachine)"
  52. make -j${jobs}
  53. make -j${jobs} DESTDIR="$destdir" install
  54. # Compress info documents and manual page
  55. rm -f "${destdir}/${infodir}/dir"; # Redundancy
  56. lzip -9 \
  57. "${destdir}/${infodir}/clzip.info" \
  58. "${destdir}/${mandir}/man1/clzip.1"
  59. # Copy documentation
  60. mkdir -p "${destdir}${docsdir}"
  61. cp -p $docs "${destdir}${docsdir}"
  62. }