recipe 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Build recipe for lziprecover.
  2. #
  3. # Copyright (c) 2017-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=lziprecover
  17. version=1.21-pre1 ; pkgversion=1.21_pre1
  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.savannah.gnu.org/releases/lzip/lziprecover/$tarname
  24. homepage=http://lzip.nongnu.org/lziprecover.html
  25. description="
  26. Data recovery tool and decompressor for files in the lzip.
  27. Lziprecover is a data recovery tool and decompressor for files in the
  28. lzip compressed data format (.lz). Lziprecover is able to repair
  29. slightly damaged files, produce a correct file by merging the good
  30. parts of two or more damaged copies, extract data from damaged files,
  31. decompress files and test integrity of files.
  32. For more information, visit: $homepage
  33. "
  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. # Set sane permissions
  44. chmod -R u+w,go-w,a+rX-s .
  45. ./configure CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
  46. $configure_args \
  47. --infodir=$infodir \
  48. --mandir=$mandir \
  49. --build="$(cc -dumpmachine)"
  50. make -j${jobs}
  51. make -j${jobs} DESTDIR="$destdir" install
  52. # Compress info documents and manual page
  53. rm -f "${destdir}/${infodir}/dir"; # Redundancy
  54. lzip -9 \
  55. "${destdir}/${infodir}/lziprecover.info" \
  56. "${destdir}/${mandir}/man1/lziprecover.1"
  57. # Copy documentation
  58. mkdir -p "${destdir}${docsdir}"
  59. cp -p $docs "${destdir}${docsdir}/"
  60. }