recipes: xfce: moved to ../testing
[dragora.git] / recipes / x-apps / fittsen / recipe
blobb095aed661b10d6b5e3795cc037c27667d07bd9a
1 # Build recipe for fittsen (fork of fittstool).
3 # Copyright (c) 2018 Markus Tornow, <tornow@riseup.net>.
4 # Copyright (c) 2018-2019 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=fittsen
19 version=20190618_277dd4f
20 release=4
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="
29   http://rsync.dragora.org/current/sources/$tarname
30   http://mirror.cedia.org.ec/dragora/current/sources/$tarname
33 description="
34 A mouse command utitlity.
36 Utility to bind commands to mouse button events on the screen corners,
37 via a simple and concise configuration file.
40 homepage=http://notabug.org/frusen/fittsen
41 license="GPLv2+ | New BSD (inih library)"
43 # Source documentation
44 docs="LICENSE* README.md github.README.md"
45 docsdir="${docdir}/${program}-${version}"
47 build()
49     set -e
51     unpack "${tardir}/$tarname"
53     cd "$srcdir"
55     # Set sane permissions
56     chmod -R u+w,go-w,a+rX-s .
58     make -j${jobs} CFLAGS="$QICFLAGS"
60     mkdir -p "${destdir}/usr/bin"
61     cp -p fittsen "${destdir}/usr/bin"/
62     chmod 755 "${destdir}/usr/bin/fittsen"
63     strip --strip-unneeded "${destdir}/usr/bin/fittsen"
65     # Make symlink for compatibility with fittstool
66     ( cd "${destdir}/usr/bin" && ln -sf fittsen fittstool )
68     # Compress and link man pages (if needed)
69     if test -d "${destdir}/$mandir"
70     then
71         (
72             cd "${destdir}/$mandir"
73             find . -type f -exec lzip -9 '{}' +
74             find . -type l | while read -r file
75             do
76                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
77                 rm -- "$file"
78             done
79         )
80     fi
82     # Copy documentation
83     mkdir -p "${destdir}${docsdir}"
84     cp -p $docs "${destdir}${docsdir}/"