summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: deb165aedf6ca3219638a8ebbf29c8aae6800518 (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
48
49
# Maintainer: Andy Weidenbaum <archbaum@gmail.com>

pkgname=gumbo-git
pkgver=20151203
pkgrel=1
pkgdesc="An HTML5 parsing library in pure C99"
arch=('i686' 'x86_64')
makedepends=('autoconf' 'automake' 'git' 'libtool' 'make' 'pkg-config')
url="https://github.com/google/gumbo-parser"
license=('Apache')
source=(${pkgname%-git}::git+https://github.com/google/gumbo-parser)
sha256sums=('SKIP')
provides=('gumbo')
conflicts=('gumbo')

pkgver() {
  cd ${pkgname%-git}
  git log -1 --format="%cd" --date=short --no-show-signature | sed "s|-||g"
}

build() {
  cd ${pkgname%-git}

  msg2 'Building...'
  ./autogen.sh
  ./configure \
    --prefix=/usr \
    --sbindir=/usr/bin \
    --libexecdir=/usr/lib/gumbo \
    --sysconfdir=/etc \
    --sharedstatedir=/usr/share/gumbo \
    --localstatedir=/var/lib/gumbo \
    --with-gnu-ld
  make
}

package() {
  cd ${pkgname%-git}

  msg2 'Installing license...'
  install -Dm 644 COPYING -t "$pkgdir/usr/share/licenses/gumbo"

  msg2 'Installing...'
  make DESTDIR="$pkgdir" install

  msg2 'Cleaning up pkgdir...'
  find "$pkgdir" -type d -name .git -exec rm -r '{}' +
  find "$pkgdir" -type f -name .gitignore -exec rm -r '{}' +
}