summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 55bfe5d204548f70e6fd2a9db6dd132ed80ead8d (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
# Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com>
# Contributor: Thomas Oster <thomas.oster@rwth-aachen.de>

pkgname=libonion-git
pkgver=0.5.r253.g169fabc
pkgrel=1
pkgdesc='lightweight C library that facilitate to create simple HTTP servers'
arch=(i686 x86_64)
url='https://github.com/davidmoreno/onion/'
license=(LGPL)
makedepends=(git)
#options=(staticlibs)
source=(git://github.com/davidmoreno/onion)
sha1sums=('SKIP')

pkgver() {
  cd onion
  git describe --tags | sed 's/^v//; s/-/.r/; s/-/./'
}

build() {
  cd onion
  mkdir build
  cd build
  cmake -DONION_USE_SYSTEMD=ON -DONION_USE_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr "$srcdir/onion"
  make
}

# Tests are broken
#check() {
#  cd onion/build
#  make test
#}

package() {
  cd onion/build
  make DESTDIR="$pkgdir" install
}