summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikaela Szekely2019-04-26 17:25:12 -0600
committerMikaela Szekely2019-04-26 17:29:42 -0600
commit47e2a7b1e71402b5bbcb21840115bd87dc42e80e (patch)
tree2d2eac9bc38d7c37aa0c68f022d6f6e19d6aa3c9
downloadaur-cargo-update-git.tar.gz
Initial commit
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD42
2 files changed, 60 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..6b701c8afd3
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = cargo-update-git
+ pkgdesc = A cargo subcommand for checking and applying updates to installed executables
+ pkgver = v1.7.0.r5.8d758b004
+ pkgrel = 1
+ url = https://github.com/nabijaczleweli/cargo-update
+ arch = i686
+ arch = x86_64
+ license = MIT
+ makedepends = cargo
+ makedepends = libgit2
+ makedepends = libssh2
+ makedepends = openssl
+ provides = cargo-update
+ source = cargo-update-git::git+https://github.com/nabijaczleweli/cargo-update
+ md5sums = SKIP
+
+pkgname = cargo-update-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..e5dda34a982
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Mikaela Szekely <qyriad@gmail.com>
+pkgname=cargo-update-git
+pkgver=v1.7.0.r5.8d758b004
+pkgrel=1
+pkgdesc="A cargo subcommand for checking and applying updates to installed executables"
+arch=('i686' 'x86_64')
+url="https://github.com/nabijaczleweli/cargo-update"
+license=('MIT')
+groups=()
+depends=()
+makedepends=('cargo' 'libgit2' 'libssh2' 'openssl')
+optdepends=()
+provides=('cargo-update')
+conflicts=('cargo-update')
+options=()
+source=("$pkgname::git+https://github.com/nabijaczleweli/cargo-update")
+md5sums=('SKIP')
+
+pkgver()
+{
+ cd "$srcdir/$pkgname"
+ local tag=$(git tag --sort=-v:refname | grep '^v[0-9]' | head -1)
+ local commits_since=$(git rev-list $tag..HEAD --count)
+ echo "$tag.r$commits_since.$(git log --pretty=format:'%h' -n 1)"
+}
+
+build()
+{
+ cd "$srcdir/$pkgname"
+ RUSTFLAGS="-C target-cpu=native" cargo build --release
+}
+
+package()
+{
+ cd "$srcdir/$pkgname"
+ install -Dm755 "target/release/cargo-install-update" "$pkgdir/usr/bin/cargo-install-update"
+ install -Dm755 "target/release/cargo-install-update-config" "$pkgdir/usr/bin/cargo-install-update-config"
+
+ install -Dm644 "man/cargo-install-update.md" "$pkgdir/usr/share/doc/${pkgname}/cargo-install-update.md"
+ install -Dm644 "man/cargo-install-update-config.md" "$pkgdir/usr/share/doc/${pkgname}/cargo-install-update-config.md"
+ install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
+}