recipes: tools/util-linux*: upgraded to version 2.33.1
[dragora.git] / recipes / tools / lziprecover / recipe
blob43e4cbe5bc68b8b12b7339cbd79c1afd287c78b1
1 # Build recipe for lziprecover.
3 # Copyright (c) 2017-2018 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 program=lziprecover
18 version=1.21-pre1 ; pkgversion=1.21_pre1
19 release=1
21 # Set 'outdir' for a nice and well-organized output directory
22 outdir="${outdir}/${arch}/tools"
24 tarname=${program}-${version}.tar.lz
26 # Remote source(s)
27 fetch=http://download.savannah.gnu.org/releases/lzip/lziprecover/$tarname
29 homepage=http://lzip.nongnu.org/lziprecover.html
31 description="
32 Data recovery tool and decompressor for files in the lzip.
34 Lziprecover is a data recovery tool and decompressor for files in the
35 lzip compressed data format (.lz).  Lziprecover is able to repair
36 slightly damaged files, produce a correct file by merging the good
37 parts of two or more damaged copies, extract data from damaged files,
38 decompress files and test integrity of files.
40 For more information, visit: $homepage
43 license=GPLv2+
45 # Source documentation
46 docs="AUTHORS COPYING ChangeLog NEWS README"
47 docsdir="${docdir}/${program}-${version}"
49 build()
51     set -e
53     unpack "${tardir}/$tarname"
55     cd "$srcdir"
57     # Set sane permissions
58     chmod -R u+w,go-w,a+rX-s .
60     ./configure CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
61      $configure_args \
62      --infodir=$infodir \
63      --mandir=$mandir \
64      --build="$(cc -dumpmachine)"
66     make -j${jobs}
67     make -j${jobs} DESTDIR="$destdir" install
69     # Compress info documents and manual page
71     rm -f "${destdir}/${infodir}/dir";  # Redundancy
72     lzip -9 \
73      "${destdir}/${infodir}/lziprecover.info" \
74      "${destdir}/${mandir}/man1/lziprecover.1"
76     # Copy documentation
77     mkdir -p "${destdir}${docsdir}"
78     cp -p $docs "${destdir}${docsdir}/"