blob: c4e0f42b70cd0bbab4c677419a74efc956fd940b (
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# Maintainer: Tim Harding <tim@timharding.co>
pkgname='neophyte-git'
pkgver=0.2.4.r0.gc62a622
pkgrel=1
pkgdesc='A WebGPU-rendered Neovim GUI'
arch=('x86_64' 'i686' 'aarch64')
url="https://github.com/tim-harding/neophyte"
license=('MIT')
depends=('fontconfig' 'freetype2' 'gcc-libs' 'glibc')
makedepends=('git' 'cargo')
provides=("neophyte=$pkgver")
conflicts=('neophyte-bin' 'neophyte')
source=("neophyte::git+$url.git")
sha256sums=('SKIP')
# From https://wiki.archlinux.org/title/VCS_package_guidelines#Package_naming
pkgver() {
cd "neophyte"
git describe --long --abbrev=7 | sed 's/-/.r/;s/-/./'
}
prepare() {
cd "neophyte"
git fetch --tags
latest_tag=$(git describe --tags "$(git rev-list --tags --max-count=1)")
git checkout "$latest_tag"
export RUSTUP_TOOLCHAIN=stable
target_platform="$(rustc -vV | sed -n 's/host: //p')"
cargo fetch \
--locked \
--target $target_platform
}
build() {
cd "neophyte"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
export RUSTFLAGS="-C target-cpu=native"
cargo build --release --frozen
}
package() {
cd "neophyte"
install \
--mode=0755 \
-D --target-directory="$pkgdir/usr/bin/" \
target/release/neophyte
install \
--mode=0644 \
-D --target-directory="$pkgdir/usr/share/applications/" \
assets/neophyte.desktop
install \
--mode=0644 \
-D --target-directory="$pkgdir/usr/share/licenses/neophyte/" \
LICENSE
install \
--mode=0644 \
-D --target-directory="$pkgdir/usr/share/doc/neophyte/" \
README.md
}
# vim: ts=4 sts=4 sw=4 et
|