summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorneoninteger2019-06-09 22:48:04 +0930
committerneoninteger2019-06-09 22:48:04 +0930
commit0d9f982386e2e4ed97284662f4bec6ba74662dd1 (patch)
tree73a343dcf7a6f82b4ed4984245c84dc34fefb7aa
downloadaur-0d9f982386e2e4ed97284662f4bec6ba74662dd1.tar.gz
Initial basic package for core-rs
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD34
-rw-r--r--vars.mk6
3 files changed, 58 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..aa058c1e51ce
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = turtl-core-rs
+ pkgdesc = Turtl's logic core, built in Rust
+ pkgver = 0.1.2
+ pkgrel = 1
+ url = https://github.com/turtl/core-rs
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ makedepends = rust
+ depends = libsodium
+ depends = openssl-1.0
+ source = https://github.com/turtl/core-rs/archive/774fa361d021d9ef5237d32d09515ab7b2a32ad2.tar.gz
+ source = vars.mk
+ sha256sums = 71c1caf3aeb6245040abb0ee063b574dd6ece6314c60edabbe4299a11df49b68
+ sha256sums = c4e7469d1a080786b71618bc812cf038a7c70881641f06cb8ae7f2d76de08e3c
+
+pkgname = turtl-core-rs
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..fda07d9946da
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Callum Parsey <neoninteger@protonmail.com>
+pkgname=turtl-core-rs
+pkgver=0.1.2
+pkgrel=1
+pkgdesc="Turtl's logic core, built in Rust"
+arch=("i686" "x86_64")
+url="https://github.com/turtl/core-rs"
+license=("GPL3")
+depends=("libsodium" "openssl-1.0")
+makedepends=("rust")
+
+# Note: Turtl core-rs is versioned but not with Git tags or releases, the only
+# way to download a specific core-rs version is using a commit hash that
+# contains modifications to the CHANGELOG.md file.
+_commithash="774fa361d021d9ef5237d32d09515ab7b2a32ad2"
+
+source=("https://github.com/turtl/core-rs/archive/${_commithash}.tar.gz"
+ "vars.mk")
+sha256sums=("71c1caf3aeb6245040abb0ee063b574dd6ece6314c60edabbe4299a11df49b68"
+ "8dd67ffa28f833baa88c57ecabcc0c5e020d53b5a5516034478a0883be29193d")
+
+prepare() {
+ cp vars.mk "core-rs-${_commithash}"
+}
+
+build() {
+ cd "core-rs-${_commithash}"
+ make release
+}
+
+package() {
+ cd "core-rs-${_commithash}"
+ install -Dm 755 target/release/libturtl_core.so -t "${pkgdir}/usr/lib"
+}
diff --git a/vars.mk b/vars.mk
new file mode 100644
index 000000000000..657637db1d9f
--- /dev/null
+++ b/vars.mk
@@ -0,0 +1,6 @@
+# Turtl core-rs expects OpenSSL v1.0.x, whereas the default (at least on my
+# system) is v1.1.x, so here we manually specify prefixes for v1.0.x.
+# This file is copied into the core-rs source tree and sourced automatically
+# from the main Makefile.
+export OPENSSL_INCLUDE_DIR=/usr/include/openssl-1.0
+export OPENSSL_LIB_DIR=/usr/lib/openssl-1.0