summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 68d03b2e76ef4ff7ab21f1a41333336b5b0373a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Maintainer: Nicholas Wang <me at nicho1as dot wang>

_pkgbase=libbestline
pkgname=libbestline-git
pkgver=r41.5a0bc4b
pkgrel=2
pkgdesc="ANSI Standard X3.64 Teletypewriter Command Session Library"
url="https://github.com/jart/bestline"
arch=('any')
license=('BSD-2-Clause')
provides=("libbestline.so" "libbestline")
makedepends=('git')
source=("libbestline::git+https://github.com/jart/bestline.git")
sha256sums=('SKIP')

pkgver () {
  cd "$srcdir/libbestline"
  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build () {
  export cc="gcc"
  cd "$srcdir/libbestline"
  make libbestline.so
}

package () {
  cd "$srcdir/libbestline"
  install -Dm755 libbestline.so -t "${pkgdir}/usr/lib/"
  install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/libbestline/"
  install -Dm644 bestline.h -t "${pkgdir}/usr/include/"
}