summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 13ccbf69dec0f7f41d65bdfe50ca06d67806a60f (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
50
51
52
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>
# Previous maintainer : JSkier <jskier at gmail dot com>
# Contributor: Ivan Shapovalov <intelfx@intelfx.name>

pkgname=hyperscan-git
pkgver=5.4.1.r2.g5c724f7
pkgrel=1
pkgdesc="High-performance multiple regex matching library"
arch=('i686' 'x86_64')
url="https://www.hyperscan.io/"
license=('BSD')
depends=('gcc-libs')
makedepends=('git' 'boost' 'cmake' 'ragel')
provides=("hyperscan=$pkgver")
conflicts=('hyperscan')
options=('staticlibs')
source=("git+https://github.com/intel/hyperscan.git")
sha256sums=('SKIP')


prepare() {
  cd "hyperscan"

  # https://github.com/intel/hyperscan/issues/292#issuecomment-762635447
  sed -i -e 's|\[^ \]|\[^ @\]|g' "cmake/build_wrapper.sh"
}

pkgver() {
  cd "hyperscan"

  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "hyperscan"

  cmake \
    -B "_build" \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX="/usr" \
    -DCMAKE_INSTALL_LIBDIR="lib" \
    -DBUILD_STATIC_AND_SHARED=ON \
    ./
  make -C "_build"
}

package() {
  cd "hyperscan"

  make -C "_build" DESTDIR="$pkgdir" install
  install -Dm644 "COPYING" -t "$pkgdir/usr/share/licenses/hyperscan"
}