summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8bb6b8ac1a1beb9b3a919340f2541e0b629f76ee (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
# Maintainer: Forest Crossman <cyrozap at gmail dot com>

pkgname=stp
pkgver=2.1.2
pkgrel=1
pkgdesc="Simple Theorem Prover"
arch=('i686' 'x86_64')
url="https://stp.github.io/"
license=('MIT')
depends=('bison' 'boost' 'flex' 'minisat-git')
makedepends=('cmake' 'git')

source=("https://github.com/$pkgname/$pkgname/archive/$pkgver.tar.gz"
        'cmake-git.patch')
sha256sums=('d7f118324a534cfa33cabe7302e717f960a3d29e01c5cabc9232d21683f0085d'
            'cedc57c9e375b145dcd9f3586505477737315194e260de0f689b7715b2088312')

prepare() {
  cd "$srcdir"

  # Since we're installing from a release archive, searching for a Git
  # directory can cause the build to fail.
  patch -p1 < cmake-git.patch
}

build() {
  cd "$srcdir/$pkgname-$pkgver"
  mkdir -p build && cd build
  cmake -DCMAKE_INSTALL_PREFIX=/usr ..
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  # Install licenses
  install -dm 755 "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}"
  install -m 644 LICENSE_COMPONENTS "${pkgdir}/usr/share/licenses/${pkgname}"

  # Install stp
  cd build
  make DESTDIR="$pkgdir/" install
}

# vim:set ts=2 sw=2 et: