1SUMMARY = "Console mouse driver"
2DESCRIPTION = "GPM (General Purpose Mouse) is a mouse server \
3for the console and xterm, with sample clients included \
4(emacs, etc)."
5HOMEPAGE = "https://www.nico.schottelius.org/software/gpm"
6SECTION = "console/utils"
7LICENSE = "GPL-2.0-or-later"
8LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
9
10PV = "1.99.7+git${SRCREV}"
11SRCREV = "e82d1a653ca94aa4ed12441424da6ce780b1e530"
12
13DEPENDS = "ncurses bison-native"
14
15SRC_URI = "git://github.com/telmich/gpm;protocol=https;branch=master \
16           file://init \
17           file://gpm.service.in \
18           "
19
20S = "${WORKDIR}/git"
21
22inherit autotools-brokensep update-rc.d systemd texinfo
23
24INITSCRIPT_NAME = "gpm"
25INITSCRIPT_PARAMS = "defaults"
26
27do_configure:prepend() {
28    (cd ${S};./autogen.sh;cd -)
29}
30
31do_install:append () {
32    install -d ${D}${systemd_system_unitdir}
33    sed 's:@bindir@:${sbindir}:' < ${WORKDIR}/gpm.service.in >${D}${systemd_system_unitdir}/gpm.service
34    install -D -m 0755 ${WORKDIR}/init ${D}${INIT_D_DIR}/gpm
35    ln -s libgpm.so.2 ${D}${libdir}/libgpm.so
36}
37
38SYSTEMD_SERVICE:${PN} = "gpm.service"
39