summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDominic2020-12-30 00:57:29 +0100
committerDominic2020-12-30 00:57:29 +0100
commit06a347c0615724b48c67778d3a6b5031946c6c21 (patch)
tree3e7181743eaf55e3458bb3a2cb7fd9ffb79cd713 /PKGBUILD
downloadaur-06a347c0615724b48c67778d3a6b5031946c6c21.tar.gz
cargo-sort-ck 2.1.1-1
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD37
1 files changed, 37 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..d474e18645e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# -*- mode: Shell-script; eval: (setq indent-tabs-mode 't); eval: (setq tab-width 4) -*-
+# Maintainer: Dominic Meiser [git at msrd0 dot de]
+
+# Package Information
+pkgname=cargo-sort-ck
+pkgver=2.1.1
+pkgrel=1
+pkgdesc='Check if tables and items in a .toml file are lexically sorted'
+arch=('x86_64')
+license=('Apache' 'MIT')
+
+# Generic Stuff for cargo packages
+url="https://crates.io/crates/$pkgname"
+depends=('gcc-libs')
+makedepends=('cargo')
+source=("$pkgname.tar.gz::https://crates.io/api/v1/crates/$pkgname/$pkgver/download")
+sha512sums=('90d2c18ffb944960eb2f4b5e264c9b9b5537942afc8cf26581a72390776bd9f1caf355943b9d1eb245cde4302fa4d0e1e3df44474ce72be95b569529c946703c')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # crates.io packages aren't supposed to contain a Cargo.lock file so
+ # don't use --locked flag
+ cargo build --release
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # change this if the crate has other binaries as well!
+ install -Dm755 "target/release/$pkgname" -t "$pkgdir/usr/bin"
+
+ # install whatever license files the distribution included
+ for file in $(ls | grep -i -e license -e copying -e copyring); do
+ install -Dm644 "$file" -t "$pkgdir/usr/share/licenses/$pkgname"
+ done
+}