archrelease: copy trunk to extra-x86_64
[arch-packages.git] / gpm / repos / core-x86_64 / PKGBUILD
blob531e62432f8af2b9dc1d94d95b0c2d3d830fcea4
1 # Maintainer: Eric BĂ©langer <eric@archlinux.org>
3 pkgname=gpm
4 pkgver=1.20.7.r38.ge82d1a6
5 _commit='e82d1a653ca94aa4ed12441424da6ce780b1e530'
6 pkgrel=4
7 pkgdesc='A mouse server for the console and xterm'
8 arch=('x86_64')
9 url='https://www.nico.schottelius.org/software/gpm/'
10 license=('GPL')
11 depends=('bash' 'procps-ng')
12 makedepends=('git')
13 provides=('libgpm.so')
14 options=('!makeflags')
15 source=("git+https://github.com/telmich/gpm.git#commit=${_commit}"
16         'gpm.sh'
17         'gpm.path'
18         'gpm.service')
19 sha256sums=('SKIP'
20             'f41e90dcf6c0c6c4b8eff1c69039a20eb6b38ea851ffd1fa47ba311bf83d6ed8'
21             '1b8712650c70fd139f844fa754e288bfe05a8ed8044d118fda75a47d66034d23'
22             'dbce5688b3ba1d5bc9c4f38bcc2d89a6d68d51b30fb5d6d29a02d0c011d3688e')
24 pkgver() {
25   cd "${srcdir}/${pkgname}"
27   GITTAG="$(git describe --abbrev=0 --tags 2>/dev/null)"
28   printf '%s.r%s.g%s' \
29     "${GITTAG}" \
30     "$(git rev-list --count ${GITTAG}..)" \
31     "$(git rev-parse --short HEAD)"
34 prepare() {
35   cd "${srcdir}/${pkgname}"
37   ./autogen.sh
40 build() {
41   cd "${srcdir}/${pkgname}"
42   
43   ./configure \
44     --prefix=/usr \
45     --sysconfdir=/etc \
46     --sbindir=/usr/bin
47   make
50 package() {
51   cd "${srcdir}/${pkgname}"
53   make DESTDIR="${pkgdir}" install
54   install -D -m0644 ../gpm.sh "${pkgdir}/etc/profile.d/gpm.sh"
55   install -D -m0644 ../gpm.path "${pkgdir}/usr/lib/systemd/system/gpm.path"
56   install -D -m0644 ../gpm.service "${pkgdir}/usr/lib/systemd/system/gpm.service"
58 # library fixes
59   cd "${pkgdir}/usr/lib/"
60   ln -s libgpm.so.2.* libgpm.so
61   chmod 0755 "${pkgdir}"/usr/lib/libgpm.so.*