pkgname=gpm pkgver=1.20.7.r38.ge82d1a6 pkgrel=1 pkgdesc="A mouse server for the console and xterm" arch=('x86_64') url="https://www.nico.schottelius.org/software/gpm" license=('GPL-1.0-only') depends=('bash' 'procps-ng') makedepends=('git') options=('!makeflags') install=${pkgname}.install source=(git+https://github.com/telmich/gpm.git#commit=e82d1a653ca94aa4ed12441424da6ce780b1e530 gpm.path gpm.service) sha256sums=(7db4089030c128d9ee5fb1afb08251d328f8f8835e4716ff41c6c08c1a90bed2 1b8712650c70fd139f844fa754e288bfe05a8ed8044d118fda75a47d66034d23 14d4f7fd80d65f9a6d20ca59df7ac143f21bd7d96e8758fc26d4b7cbc8e1aaf3) pkgver() { cd ${pkgname} GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)" printf '%s.r%s.g%s' \ "${GITTAG}" \ "$(git rev-list --count ${GITTAG}..)" \ "$(git rev-parse --short HEAD)" } prepare() { cd ${pkgname} ./autogen.sh } build() { cd ${pkgname} local configure_args=( --sysconfdir=/etc ${configure_options} ) ./configure ${configure_args[@]} make } package() { cd ${pkgname} make DESTDIR=${pkgdir} install ln -sfv libgpm.so.2.1.0 ${pkgdir}/usr/lib64/libgpm.so install -v -m644 conf/gpm-root.conf ${pkgdir}/etc install -vdm755 ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/support install -v -m644 doc/support/* ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/support install -v -m644 doc/{FAQ,HACK_GPM,README*} ${pkgdir}/usr/share/doc/${pkgname}-${pkgver} install -vDm644 ${srcdir}/gpm.service -t ${pkgdir}/usr/lib/systemd/system/ install -vDm644 ${srcdir}/gpm.path -t ${pkgdir}/usr/lib/systemd/system/ }