summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f1f7ad8498a9b744e4cb714e9cfd51cfabb1bd0b (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
36
37
38
39
40
41
42
43
44
45
46
47
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=aribb24-git
pkgver=1.0.3.r5.g5e9be27
pkgrel=1
pkgdesc="A library for ARIB STD-B24, decoding JIS 8 bit characters and parsing MPEG-TS stream"
arch=('i686' 'x86_64')
url="https://github.com/nkoriyama/aribb24"
license=('LGPL-3.0-or-later')
depends=('glibc' 'libpng')
makedepends=('git')
provides=("aribb24=$pkgver")
conflicts=('aribb24')
options=('staticlibs')
source=("git+https://github.com/nkoriyama/aribb24.git")
sha256sums=('SKIP')


pkgver() {
  cd "aribb24"

  _tag=$(git tag -l --sort -v:refname | grep -E '^v?[0-9\.]+$' | head -n1)
  _rev=$(git rev-list --count $_tag..HEAD)
  _hash=$(git rev-parse --short HEAD)
  printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash" | sed 's/^v//'
}

build() {
  cd "aribb24"

  ./bootstrap
  ./configure \
    --prefix="/usr"
  make
}

check() {
  cd "aribb24"

  make check
}

package() {
  cd "aribb24"

  make DESTDIR="$pkgdir" install
}