summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesin2017-08-12 02:30:14 -0400
committerJesin2017-08-12 02:30:14 -0400
commit6a5b70ef5548cbb0a9c49ac0afd6c88e46d638e2 (patch)
tree69573576054c2c35296fdcf997bca6debcb30738
downloadaur-6a5b70ef5548cbb0a9c49ac0afd6c88e46d638e2.tar.gz
Created libb2 package
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD41
2 files changed, 55 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e25bdba929ec
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = libb2
+ pkgdesc = C library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp hash functions
+ pkgver = 0.0.15.g9a0d006
+ pkgrel = 1
+ url = https://blake2.net/
+ arch = i686
+ arch = x86_64
+ license = custom:CC0
+ makedepends = git
+ source = git+https://github.com/BLAKE2/libb2
+ sha256sums = SKIP
+
+pkgname = libb2
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..cf6f2cdac5f6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Jesin <Jesin00@gmail.com>
+pkgname=libb2
+pkgver=0.0.15.g9a0d006
+pkgrel=1
+arch=(i686 x86_64)
+pkgdesc='C library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp hash functions'
+url=https://blake2.net/
+license=(custom:CC0)
+makedepends=(git)
+source=("git+https://github.com/BLAKE2/$pkgname")
+sha256sums=(SKIP)
+
+# libb2's build system discards the $CFLAGS variable.
+# We can get around this by putting those flags in $CC.
+export CC="${CC-cc} $CFLAGS"
+
+prepare() {
+ cd "$pkgname"
+ # If there are no tags, tag the initial commit so pkgver() can work.
+ [ -n "$(git tag)" ] || git tag 0.0 "$(git rev-list --max-parents=0 --reverse HEAD | head -n1)"
+ autoreconf -fiv
+}
+
+pkgver() {
+ cd "$pkgname"
+ local v="$(git describe --tags)"
+ printf %s\\n "${v//-/.}"
+}
+
+build() {
+ cd "$pkgname"
+ ./configure --prefix=/usr --disable-static --enable-shared "--build=$CHOST" #--disable-native --enable-fat
+ # Uncomment the flags at the end of the previous line if you intend
+ # to distribute the binary package to other computers.
+ make
+}
+
+package() {
+ cd "$pkgname"
+ make "DESTDIR=$pkgdir" install
+}