recipes: x-apps/fittstool: accommodate recipe
[dragora.git] / recipes / x-apps / fittstool / recipe
blob75840114048165e57620577a1e5f5cc7bc7fc457
1 # Build recipe for fittstool.
3 # Copyright (c) 2018 Markus Tornow, <tornow@riseup.net>.
4 # Copyright (c) 2018 Matias Fonzo, <selk@dragora.org>.
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 #    http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 program=fittstool
19 version=7d68920
20 release=1
22 # Set 'outdir' for a nice and well-organized output directory
23 outdir="${outdir}/${arch}/x-apps"
25 tarname=${program}-${version}.tar.lz
27 # Remote source(s)
28 fetch=http://rsync.dragora.org/current/sources/$tarname
30 description="
31 A mouse command utitlity.
33 Utility to bind commands to mouse button events on the screen corners,
34 via a simple and concise configuration file.
37 homepage=http://github.com/jeanCarloMachado/fittstool
38 license="GPLv2+"
40 # Source documentation
41 docs="Authors COPYING ChangeLog README.md "
42 docsdir="${docdir}/${program}-${version}"
44 build()
46     set -e
48     unpack "${tardir}/$tarname"
50     cd "$srcdir"
52     make -j${jobs} CFLAGS="$QICFLAGS"
53     make -j${jobs} DESTDIR="$destdir" install
55     strip --strip-unneeded "${destdir}/usr/bin/fittstool"
57     # Compress and link man pages (if needed)
58     if test -d "${destdir}/$mandir"
59     then
60         (
61             cd "${destdir}/$mandir"
62             find . -type f -exec lzip -9 '{}' +
63             find . -type l | while read -r file
64             do
65                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
66                 rm -- "$file"
67             done
68         )
69     fi
71     # Copy documentation
72     mkdir -p "${destdir}${docsdir}"
73     cp -p $docs "${destdir}${docsdir}/"