1 # Build recipe for mtdev.
3 # Copyright (c) 2017 Mateus P. Rodrigues, <mprodrigues@dragora.org>.
4 # Copyright (c) 2021 Matias A. 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 # Exit immediately on any error
25 # Define a category for the output of the package name
28 tarname=${program}-${version}.tar.bz2
31 fetch=https://bitmath.org/code/mtdev/$tarname
34 Multitouch Protocol Translation Library.
36 The mtdev is a stand-alone library which transforms all variants of
37 kernel MT events to the slotted type B protocol. The events put into
38 mtdev may be from any MT device, specifically type A without contact
39 tracking, type A with contact tracking, or type B with contact
40 tracking. See the kernel documentation for further details.
43 homepage=https://bitmath.org/code/mtdev/
46 # Source documentation
47 docs="COPYING ChangeLog README"
48 docsdir="${docdir}/${pkgname}-${version}"
52 unpack "${tardir}/$tarname"
56 # Update for several hosts (including Musl)
57 cp -f "${worktree}/archive/common/config.guess" config-aux/config.guess
58 cp -f "${worktree}/archive/common/config.sub" config-aux/config.sub
60 # Set sane permissions
61 chmod -R u+w,go-w,a+rX-s .
63 ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
65 --libdir=/usr/lib${libSuffix} \
69 --build="$(gcc -dumpmachine)"
72 make -j${jobs} DESTDIR="$destdir" install-strip
74 # Compress info documents deleting index file for the package
75 if test -d "${destdir}/$infodir"
77 rm -f "${destdir}/${infodir}/dir"
78 lzip -9 "${destdir}/${infodir}"/*
81 # Compress and link man pages (if needed)
82 if test -d "${destdir}/$mandir"
85 cd "${destdir}/$mandir"
86 find . -type f -exec lzip -9 {} +
87 find . -type l | while read -r file
89 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
96 mkdir -p "${destdir}/$docsdir"
97 cp -p $docs "${destdir}/$docsdir"