recipes: tools/gpm: Remove autogen.sh
[dragora.git] / recipes / tools / gpm / recipe
blob6863ce22a00e2d3d76782d89c7f0ed2e23e7b019
1 # Build recipe for gpm.
3 # Copyright (c) 2018-2020 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=gpm
18 version=20200617_e82d1a6
19 release=1
21 # Define a category for the output of the package name
22 pkgcategory=tools
24 tarname=${program}-${version}.tar.lz
26 # Remote source(s)
27 fetch="
28  http://rsync.dragora.org/current/sources/$tarname
29  http://mirror.cedia.org.ec/dragora/current/sources/$tarname
32 description="
33 Utility and mouse server for virtual consoles.
35 The gpm daemon tries to be a useful mouse server for applications
36 running on the GNU/Linux console.  Its roots are in the "selection"
37 package, by Andrew Haylett, and the original code comes from
38 selection itself.
40 This package is intended as a replacement for selection, to provide
41 additional facilities.
44 homepage=http://www.nico.schottelius.org/software/gpm/
45 license=GPLv2+
47 # Source documentation
48 docs="COPYING README* TODO"
49 docsdir="${docdir}/${program}-${version}"
51 build()
53     set -e
55     unpack "${tardir}/$tarname"
57     cd "$srcdir"
59     # Set sane permissions
60     chmod -R u+w,go-w,a+rX-s .
62     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
63      $configure_args \
64      --libdir=/usr/lib${libSuffix} \
65      --sysconfdir=/etc/gpm \
66      --infodir=$infodir \
67      --mandir=$mandir \
68      --docdir=$docsdir \
69      --without-curses \
70      --build="$(gcc -dumpmachine)"
72     make -j${jobs} V=1
73     make -j${jobs} DESTDIR="$destdir" install
74     strip --strip-debug "${destdir}/usr/lib${libSuffix}/libgpm.a"
76     # Emacs already cover this
77     rm -rf "${destdir}/usr/share/emacs"
79     # Make symlink for compatibility, just in case
80     ln -s libgpm.so.2.1.0 "${destdir}/usr/lib${libSuffix}/libgpm.so"
82     # Include configuration files for GPM
84     mkdir -p "${destdir}/etc/gpm"
85     cp -p conf/*.conf "${destdir}/etc/gpm"
86     chmod 644 "${destdir}/etc/gpm"/*.conf
87     touch "${destdir}/etc/gpm/.graft-config"
89     # Include menu-driven tool to configure the mouse
91     mkdir -p "${destdir}/usr/sbin"
92     cp -p "${worktree}/archive/dragora-tools/dragora-mouse" \
93           "${destdir}/usr/sbin"
94     chmod 755 "${destdir}/usr/sbin/dragora-mouse"
96     # Make compatible symlinks for the invocation.
97     #
98     # gpmconfig was the name used for Dragora-2
99     ln -sf dragora-mouse "${destdir}/usr/sbin/gpmconfig"
101     # Perhaps, for Slackware users?
102     ln -sf dragora-mouse "${destdir}/usr/sbin/mouseconfig"
104     # Compress info documents deleting index file for the package
105     if test -d "${destdir}/$infodir"
106     then
107         rm -f "${destdir}/${infodir}/dir"
108         lzip -9 "${destdir}/${infodir}"/*
109     fi
111     # Compress and link man pages (if needed)
112     if test -d "${destdir}/$mandir"
113     then
114         (
115             cd "${destdir}/$mandir"
116             find . -type f -exec lzip -9 '{}' +
117             find . -type l | while read -r file
118             do
119                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
120                 rm -- "$file"
121             done
122         )
123     fi
125     # Copy documentation
126     mkdir -p "${destdir}${docsdir}"
127     cp -p $docs "${destdir}${docsdir}"