summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Harding2024-03-23 14:29:50 -0700
committerTim Harding2024-03-23 14:29:50 -0700
commit1f0487f764506b6afadb49654e2199721e593ba8 (patch)
treea5dcc7cb83383a8ef4c6ac4ccd69a85a1c27854f
downloadaur-1f0487f764506b6afadb49654e2199721e593ba8.tar.gz
Initial commit
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD64
2 files changed, 85 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a159ba4495a9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = neophyte
+ pkgdesc = A WebGPU-rendered Neovim GUI
+ pkgver = 0.2.5
+ pkgrel = 1
+ url = https://github.com/tim-harding/neophyte
+ arch = x86_64
+ arch = i686
+ arch = aarch64
+ license = MIT
+ makedepends = cargo
+ depends = fontconfig
+ depends = freetype2
+ depends = gcc-libs
+ depends = glibc
+ provides = neophyte=0.2.5
+ conflicts = neophyte-bin
+ conflicts = neophyte-git
+ source = neophyte-0.2.5.tar.gz::https://static.crates.io/crates/neophyte/neophyte-0.2.5.crate
+ sha256sums = SKIP
+
+pkgname = neophyte
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0e7d656c532b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,64 @@
+# Maintainer: Tim Harding <tim@timharding.co>
+
+pkgname='neophyte'
+pkgver='0.2.5'
+pkgrel=1
+pkgdesc='A WebGPU-rendered Neovim GUI'
+arch=('x86_64' 'i686' 'aarch64')
+url="https://github.com/tim-harding/$pkgname"
+license=('MIT')
+depends=('fontconfig' 'freetype2' 'gcc-libs' 'glibc')
+makedepends=('cargo')
+provides=("$pkgname=$pkgver")
+conflicts=("$pkgname-bin" "$pkgname-git")
+source=("$pkgname-$pkgver.tar.gz::https://static.crates.io/crates/$pkgname/$pkgname-$pkgver.crate")
+sha256sums=('SKIP')
+
+# See for best practices:
+# https://wiki.archlinux.org/title/Rust_package_guidelines
+#
+# Test in a clean chroot with `extra-x86_64-build`:
+# https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot
+
+prepare() {
+ cd "$pkgname-$pkgver"
+ export RUSTUP_TOOLCHAIN=stable
+ target_platform="$(rustc -vV | sed -n 's/host: //p')"
+ cargo fetch \
+ --locked \
+ --target $target_platform
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ export RUSTFLAGS="-C target-cpu=native"
+ cargo build --release --frozen
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+
+ install \
+ --mode=0755 \
+ -D --target-directory="$pkgdir/usr/bin/" \
+ target/release/$pkgname
+
+ install \
+ --mode=0644 \
+ -D --target-directory="$pkgdir/usr/share/applications/" \
+ assets/neophyte.desktop
+
+ install \
+ --mode=0644 \
+ -D --target-directory="$pkgdir/usr/share/licenses/$pkgname/" \
+ LICENSE
+
+ install \
+ --mode=0644 \
+ -D --target-directory="$pkgdir/usr/share/doc/$pkgname/" \
+ README.md
+}
+
+# vim: ts=4 sts=4 sw=4 et