summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO19
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD41
3 files changed, 64 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..140f41e1420d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = foundry
+ pkgdesc = A blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
+ pkgver = v1.0.0
+ pkgrel = 1
+ url = https://getfoundry.sh
+ arch = x86_64
+ arch = aarch64
+ license = MIT
+ license = APACHE
+ makedepends = git
+ makedepends = cargo
+ provides = forge
+ provides = cast
+ provides = anvil
+ provides = chisel
+ source = git+https://github.com/foundry-rs/foundry.git#tag=v1.0.0
+ sha512sums = SKIP
+
+pkgname = foundry
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..018a3de08144
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*
+!PKGBUILD
+!.SRCINFO
+!.gitignore
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..645bc817a6cf
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Oliver Nordbjerg <hi@notbjerg.me>
+
+pkgname=foundry
+pkgver=v1.0.0
+pkgrel=1
+pkgdesc="A blazing fast, portable and modular toolkit for Ethereum application development written in Rust."
+arch=('x86_64' 'aarch64')
+url="https://getfoundry.sh"
+license=('MIT' 'APACHE')
+depends=(libusb)
+makedepends=('git' 'cargo')
+provides=(forge cast anvil chisel)
+source=("git+https://github.com/foundry-rs/foundry.git#tag=${pkgver}")
+sha512sums=('SKIP')
+
+prepare() {
+ cd ${pkgname}
+
+ export RUSTUP_TOOLCHAIN=stable
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+}
+
+build() {
+ cd ${pkgname}
+
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ cargo build --bins --frozen --release
+}
+
+package() {
+ cd ${pkgname}
+
+ install -Dm755 "target/release/forge" "$pkgdir/usr/bin/forge"
+ install -Dm755 "target/release/cast" "$pkgdir/usr/bin/cast"
+ install -Dm755 "target/release/anvil" "$pkgdir/usr/bin/anvil"
+ install -Dm755 "target/release/chisel" "$pkgdir/usr/bin/chisel"
+
+ install -Dm644 "LICENSE-MIT" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE-MIT"
+ install -Dm644 "LICENSE-APACHE" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE-APACHE"
+}