qi: Bump to release 2.12
[dragora.git] / recipes / tools / lziprecover / recipe
blob38b4ec4688b8a7c49db1ef676eba5a1d1500e241
1 # Build recipe for lziprecover.
3 # Copyright (c) 2017-2019, 2021-2022 Matias Fonzo, <selk@dragora.org>.
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
9 #    http://www.apache.org/licenses/LICENSE-2.0
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.
17 # Exit immediately on any error
18 set -e
20 program=lziprecover
21 version=1.23
22 release=2
24 # Define a category for the output of the package name
25 pkgcategory=tools
27 tarname=${program}-${version}.tar.lz
29 # Remote source(s)
30 fetch=https://download.savannah.gnu.org/releases/lzip/lziprecover/$tarname
32 homepage=https://lzip.nongnu.org/lziprecover.html
34 description="
35 Data recovery tool and decompressor for files in the lzip.
37 Lziprecover is a data recovery tool and decompressor for files in the
38 lzip compressed data format (.lz).  Lziprecover is able to repair
39 slightly damaged files, produce a correct file by merging the good
40 parts of two or more damaged copies, extract data from damaged files,
41 decompress files and test integrity of files.
43 For more information, visit: $homepage
46 license=GPLv2+
48 # Source documentation
49 docs="AUTHORS COPYING ChangeLog NEWS README"
50 docsdir="${docdir}/${program}-${version}"
52 build()
54     unpack "${tardir}/$tarname"
56     cd "$srcdir"
58     # Set sane permissions
59     chmod -R u+w,go-w,a+rX-s .
61     ./configure CPPFLAGS="$QICPPFLAGS" \
62     CXXFLAGS+="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
63      $configure_args \
64      --infodir=$infodir \
65      --mandir=$mandir \
66      --build="$(gcc -dumpmachine)"
68     make -j${jobs} V=1
69     make -j${jobs} DESTDIR="$destdir" install
71     # Compress info documents and manual page
73     rm -f "${destdir}/${infodir}/dir";  # Redundancy
74     lzip -9 \
75      "${destdir}/${infodir}/lziprecover.info" \
76      "${destdir}/${mandir}/man1/lziprecover.1"
78     # Copy documentation
79     mkdir -p "${destdir}/$docsdir"
80     cp -p $docs "${destdir}/$docsdir"