recipe 2.1 KB

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