summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYigit Sever2021-11-03 11:31:26 +0300
committerYigit Sever2021-11-03 11:31:26 +0300
commit7450e98a989ee6aef03a84402d5bb36c6c3a0f5e (patch)
tree6c739c9915973d3c826dba5bb56e464428bdca61
downloadaur-7450e98a989ee6aef03a84402d5bb36c6c3a0f5e.tar.gz
Publishing to AUR
-rw-r--r--.SRCINFO15
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD37
3 files changed, 55 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..dcfd5a6fc46e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = ouch-git
+ pkgdesc = Painless compression and decompression in the terminal
+ pkgver = r385.a1c4f03
+ pkgrel = 1
+ url = https://github.com/ouch-org/ouch/
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = cargo
+ provides = ouch
+ conflicts = ouch
+ source = ouch::git+https://github.com/ouch-org/ouch/
+ sha256sums = SKIP
+
+pkgname = ouch-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..1d65adf6de3a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+*
+!PKGBUILD
+!.SRCINFO
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..0301a9527922
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Yigit Sever <yigit at yigitsever dot com>
+
+pkgname=ouch-git
+_pkgname=${pkgname%-git}
+pkgver=r385.a1c4f03
+pkgrel=1
+pkgdesc="Painless compression and decompression in the terminal"
+arch=('x86_64')
+url="https://github.com/ouch-org/ouch/"
+license=('MIT')
+makedepends=('git' 'cargo')
+provides=($_pkgname)
+conflicts=($_pkgname)
+source=("${_pkgname}::git+${url}")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/${_pkgname}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$srcdir/${_pkgname}"
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+}
+
+build() {
+ cd "$srcdir/${_pkgname}"
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ cargo build --frozen --release --all-features
+}
+
+package() {
+ cd "$srcdir/${_pkgname}"
+ install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/${_pkgname}"
+}