summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 51488e0f6d679ab1ba41b29f44049d1a9d8dd29b (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
# Maintainer: Matt Harrison <matt@harrison.us.com>
# Maintained at: https://github.com/matt-h/aur-pkgbuilds

pkgname=robotstxt
# No released version yet, so versioned based on the number of commits.
# Zeros to preserve numbering for any future version available.
pkgver=0.0.0.59
pkgrel=1
pkgdesc="Google's robots.txt parser and matcher as a C++ library (compliant to C++11)."
arch=('x86_64')
url="https://github.com/google/robotstxt"
license=('Apache')
depends=('gcc-libs')
makedepends=('bazel')
_git_commit='750aec7933648c816d6d5bb2f4fe5c30f2485ccf'
source=("$pkgname-$pkgver.tar.gz::https://github.com/google/robotstxt/archive/$_git_commit.tar.gz")
sha256sums=('dfb60ef01b63585521115cbbc0b344f3116cf7b081000693305f5d98fdc16eba')

build() {
  cd "$srcdir/robotstxt-$_git_commit"
  bazel build :robots_main
}

package() {
  install -dm0755 "$pkgdir/usr/bin"

  install -m0755 "$srcdir/robotstxt-$_git_commit/bazel-bin/robots_main" "$pkgdir/usr/bin/robots_main"
}

check() {
  cd "$srcdir/robotstxt-$_git_commit"
  bazel test :robots_test
}