diff options
author | George Tsiamasiotis | 2023-09-11 00:44:54 +0300 |
---|---|---|
committer | George Tsiamasiotis | 2023-09-11 00:44:54 +0300 |
commit | c651e714ed2c1564d8d8f671fa603a403f401416 (patch) | |
tree | 679184521ccccae64a15f8dcbacc0f38ee1225a4 | |
download | aur-nickel-git.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | .gitignore | 6 | ||||
-rw-r--r-- | PKGBUILD | 72 |
3 files changed, 100 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..3eab1113e047 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = nickel-git + pkgdesc = Better configuration for less + pkgver = 1.1.1.r121.be9269a + pkgrel = 1 + url = https://nickel-lang.org/ + arch = x86_64 + license = MIT + checkdepends = python + makedepends = git + makedepends = cargo + depends = glibc + depends = gcc-libs + source = nickel-git::git+https://github.com/tweag/nickel.git + sha256sums = SKIP + +pkgname = nickel-git + provides = nickel + conflicts = nickel + +pkgname = nickel-language-server-git + provides = nls + conflicts = nls diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..3fbf28a8c839 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +# Ignore build artifacts +/src +/pkg +/*.log +/*.tar.* +/*-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..bb2ab636d6c7 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,72 @@ +# Maintainer: George Tsiamasiotis <gtsiam@windowslive.com> + +pkgbase=nickel-git +pkgname=(nickel-git nickel-language-server-git) +pkgver=1.1.1.r121.be9269a +pkgrel=1 +pkgdesc='Better configuration for less' +arch=(x86_64) +url='https://nickel-lang.org/' +license=('MIT') +depends=(glibc gcc-libs) +makedepends=(git cargo) +checkdepends=(python) + +source=( + "$pkgbase::git+https://github.com/tweag/nickel.git" +) +sha256sums=( + SKIP +) + +pkgver() { + cd "$pkgbase" + + local gitver=$(git tag | sed -nE '/^v?[0-9.]+$/p' | sort -rV | head -n1) + printf "%s.r%s.%s" \ + "$gitver" \ + "$(git rev-list --count $gitver..HEAD)" \ + "$(git rev-parse --short=7 HEAD)" +} + +prepare() { + cd "$pkgbase" + + RUSTUP_TOOLCHAIN=stable \ + cargo fetch --locked --target "$CARCH-unknown-linux-gnu" +} + +build() { + cd "$pkgbase" + + RUSTUP_TOOLCHAIN=stable \ + CARGO_TARGET_DIR=target \ + cargo build --frozen --release --all-features --bins +} + +check() { + cd "$pkgbase" + + RUSTUP_TOOLCHAIN=stable \ + cargo test --frozen --all-features +} + +package_nickel-git() { + provides=(nickel) + conflicts=(nickel) + + cd "$pkgbase" + + install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/nickel" + install -Dm0755 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE +} + +package_nickel-language-server-git() { + provides=(nls) + conflicts=(nls) + + cd "$pkgbase" + + install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/nls" + install -Dm0755 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE +} |