summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f849ec94453ff4a531d1e8419b6d245512fd354b (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
# Maintainer: Patrice Lacouture <archlinux@lacouture.org>
pkgname=libsqrl-git
pkgver=20180430.135f6ba
pkgrel=1
pkgdesc="A SQRL Authentication library"
arch=('x86_64')
url="https://github.com/Novators/libsqrl"
license=('MIT')
depends=('uriparser' 'libsodium')
makedepends=('git' 'cmake')
conflicts=('libsqrl')
provides=('libsqrl')
source=('git+https://github.com/Novators/libsqrl.git')
md5sums=('SKIP')

pkgver() {
  cd "${pkgname%-git}"
  git log -1 --format='%cd.%h' --date=short | tr -d -
}

prepare() {
	cd "$srcdir/${pkgname%-git}"
        mkdir -p build
}

build() {
	cd "$srcdir/${pkgname%-git}/build"
        cmake -DCMAKE_INSTALL_PREFIX="$pkgdir/usr/" ..
        make
}

package() {
	cd "$srcdir/${pkgname%-git}/build"
        make install
        mkdir -p "$pkgdir/usr/share/licenses/${pkgname}"
        install -m 755 "$srcdir/${pkgname%-git}/LICENSE" "$pkgdir/usr/share/licenses/${pkgname}"
}