blob: 0b2bf79618106629ded5a1b7dfc4dc3cc52a4b15 (
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
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# Maintainer: tblFlip <root@tblflip.de
# Contributor: Dominik Schwaiger <mail@dominik-schwaiger.ch>
pkgname=surrealdb
pkgver=2.1.4
pkgrel=1
pkgdesc="A scalable, distributed, collaborative, document-graph database, for the realtime web"
arch=('x86_64')
url="https://github.com/surrealdb/surrealdb"
license=("BUSL-1.1")
depends=("gcc-libs" "glibc")
makedepends=("rustup" "cargo-make" "clang" "patch" "git")
checkdepends=("rustup" "cargo-make" "clang" "patch" "git")
provides=("surrealdb")
conflicts=("surrealdb-bin")
source=(
"https://github.com/${pkgname}/${pkgname}/releases/download/v${pkgver//_/-}/LICENSE"
"${pkgname}-${pkgver}.tar.gz::https://github.com/${pkgname}/${pkgname}/archive/refs/tags/v${pkgver//_/-}.tar.gz"
)
sha256sums=(
"dd98c688e54be8b85ad79e603f5112449b9789dfc031db94eb5c7dc843702aef"
"9b46926766d40d174c011665847e966afd91e4f2e77af60538c5fa5f380964be"
)
prepare() {
cd "$pkgname-${pkgver//_/-}" || exit
rustup toolchain install 1.80.1
rustup override set 1.80.1
rustup target add "$CARCH-unknown-linux-gnu"
}
build() {
cd "$pkgname-${pkgver//_/-}" || exit
# Now for some hilarious reason, rquickjs is really picky about lto in some situations.
# It also doesnt quite help that rustc blankly reports that as E0463.
export CFLAGS="${CFLAGS//-flto=[^ ]*/ }"
export CXXFLAGS="${CXXFLAGS//-flto=[^ ]*/ }"
export LDFLAGS="${LDFLAGS//-flto=[^]*/ }"
cargo build --release --locked --target "$CARCH-unknown-linux-gnu"
}
package() {
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
cd "$pkgname-${pkgver//_/-}" || exit
install -Dm755 "target/$CARCH-unknown-linux-gnu/release/surreal" "$pkgdir/usr/bin/surreal"
}
|