Last active
December 12, 2023 20:00
-
-
Save maxux/77205551ad0a9dcd64a570917a3c7744 to your computer and use it in GitHub Desktop.
Arch tfchain build script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkgname="tfchain" | |
pkgver="2.6.0" | |
pkgrel="1" | |
pkgdesc="Threefold TFChain" | |
arch=("x86_64") | |
source=("https://example.com/${pkgname}-${pkgver}.tar.gz") | |
source=("https://github.com/threefoldtech/tfchain/archive/refs/tags/v${pkgver}.tar.gz") | |
license=("custom") | |
sha256sums=("a9059ae45895fff39d3eeeeaad2eda1298103d9f66232fca826d86f940cea010") | |
makedepends=("base-devel" "protobuf" "clang" "llvm" "gcc12" "rustup") | |
build() { | |
# use rustup, specific version are needed and defined | |
# in rust cargo file | |
cd "${pkgname}-${pkgver}/substrate-node" | |
CC=gcc-12 CXX=g++-12 cargo build --release | |
} | |
package() { | |
mkdir -p "${pkgdir}/usr/bin" | |
cp "${pkgname}-${pkgver}/substrate-node/target/release/tfchain" "${pkgdir}/usr/bin" | |
chmod +x "${pkgdir}/usr/bin/tfchain" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pacman -Sy | |
pacman -S --noconfirm fakeroot sudo base-devel | |
useradd -m maxux | |
echo "maxux ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/maxux | |
# Now run `makepkg -fs` as maxux user (cannot be done as root) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment