summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChocobo12020-04-18 22:29:39 +0800
committerChocobo12020-04-18 22:43:21 +0800
commit6c942927823887db9b2a2cf6a574241f14886b07 (patch)
treec10e61a17b6454644c3fcc6b21dc125abd93e536
downloadaur-6c942927823887db9b2a2cf6a574241f14886b07.tar.gz
newpkg: cfnts-git r190.g094611f-1
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD44
2 files changed, 62 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..57121b07977b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = cfnts-git
+ pkgdesc = NTS protocol implementation written in Rust
+ pkgver = r190.g094611f
+ pkgrel = 1
+ url = https://blog.cloudflare.com/announcing-cfnts/
+ arch = i686
+ arch = x86_64
+ license = BSD
+ makedepends = git
+ makedepends = rust
+ depends = gcc-libs
+ provides = cfnts
+ conflicts = cfnts
+ source = git+https://github.com/cloudflare/cfnts.git
+ sha256sums = SKIP
+
+pkgname = cfnts-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2f495fd2e725
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>
+
+pkgname=cfnts-git
+pkgver=r190.g094611f
+pkgrel=1
+pkgdesc="NTS protocol implementation written in Rust"
+arch=('i686' 'x86_64')
+url="https://blog.cloudflare.com/announcing-cfnts/"
+license=('BSD')
+depends=('gcc-libs')
+makedepends=('git' 'rust')
+provides=('cfnts')
+conflicts=('cfnts')
+source=("git+https://github.com/cloudflare/cfnts.git")
+sha256sums=('SKIP')
+
+
+pkgver() {
+ cd "cfnts"
+
+ _rev=$(git rev-list --count --all)
+ _hash=$(git rev-parse --short HEAD)
+ printf "r%s.g%s" "$_rev" "$_hash"
+}
+
+
+check() {
+ cd "cfnts"
+
+ RUSTFLAGS="-C target-feature=+aes,+ssse3" cargo test \
+ --release
+}
+
+package() {
+ cd "cfnts"
+
+ RUSTFLAGS="-C target-feature=+aes,+ssse3" cargo install \
+ --no-track \
+ --root "$pkgdir/usr" \
+ --path "$srcdir/cfnts"
+
+ install -Dm644 "README.md" -t "$pkgdir/usr/share/doc/cfnts"
+ install -Dm644 "LICENSE" -t "$pkgdir/usr/share/licenses/cfnts"
+}