recipe 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # Build recipe for lziprecover.
  2. #
  3. # Copyright (c) 2017-2019, 2021-2022 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=lziprecover
  19. version=1.23
  20. release=2
  21. # Define a category for the output of the package name
  22. pkgcategory=tools
  23. tarname=${program}-${version}.tar.lz
  24. # Remote source(s)
  25. fetch=https://download.savannah.gnu.org/releases/lzip/lziprecover/$tarname
  26. homepage=https://lzip.nongnu.org/lziprecover.html
  27. description="
  28. Data recovery tool and decompressor for files in the lzip.
  29. Lziprecover is a data recovery tool and decompressor for files in the
  30. lzip compressed data format (.lz). Lziprecover is able to repair
  31. slightly damaged files, produce a correct file by merging the good
  32. parts of two or more damaged copies, extract data from damaged files,
  33. decompress files and test integrity of files.
  34. For more information, visit: $homepage
  35. "
  36. license=GPLv2+
  37. # Source documentation
  38. docs="AUTHORS COPYING ChangeLog NEWS README"
  39. docsdir="${docdir}/${program}-${version}"
  40. build()
  41. {
  42. unpack "${tardir}/$tarname"
  43. cd "$srcdir"
  44. # Set sane permissions
  45. chmod -R u+w,go-w,a+rX-s .
  46. ./configure CPPFLAGS="$QICPPFLAGS" \
  47. CXXFLAGS+="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
  48. $configure_args \
  49. --infodir=$infodir \
  50. --mandir=$mandir \
  51. --build="$(gcc -dumpmachine)"
  52. make -j${jobs} V=1
  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}/lziprecover.info" \
  58. "${destdir}/${mandir}/man1/lziprecover.1"
  59. # Copy documentation
  60. mkdir -p "${destdir}/$docsdir"
  61. cp -p $docs "${destdir}/$docsdir"
  62. }