summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorPhilipp Lay2020-08-29 17:22:47 +0200
committerPhilipp Lay2020-08-29 17:22:47 +0200
commit1ee1dc3effc5617d767eb771681edb63359638ed (patch)
tree69fa867c4bccbda5fd69272773c578d2ba6d0679 /PKGBUILD
downloadaur-libeddsa-git.tar.gz
initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD40
1 files changed, 40 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..37b0a25fdf7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Philipp Lay <libeddsa@phlay.de>
+pkgname=libeddsa-git
+pkgver=0.6
+pkgrel=1
+pkgdesc="cryptographic library for ed25519 and x25519"
+arch=('i686' 'x86_64')
+url="https://github.com/phlay/libeddsa"
+license=('public-domain')
+depends=()
+optdepends=()
+makedepends=('cmake')
+provides=('libeddsa')
+conflicts=()
+replaces=()
+source=('git+https://github.com/phlay/libeddsa.git')
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/libeddsa"
+ MAJOR=$(egrep -o "EDDSA_VERSION_MAJOR [[:digit:]]+" CMakeLists.txt | cut -f2 -d' ')
+ MINOR=$(egrep -o "EDDSA_VERSION_MINOR [[:digit:]]+" CMakeLists.txt | cut -f2 -d' ')
+ echo "$MAJOR.$MINOR"
+}
+
+build() {
+ mkdir "$srcdir/build"
+ cd "$srcdir/build"
+ cmake "$srcdir/libeddsa" -DBUILD_TESTING=ON -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+check() {
+ cd "$srcdir/build"
+ ctest
+}
+
+package() {
+ cd "$srcdir/build"
+ make DESTDIR="$pkgdir" install
+}