recipe 2.2 KB

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