summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Martinez2022-03-22 09:23:26 -0500
committerLuis Martinez2022-03-22 09:23:26 -0500
commit31365d78608fdbe5f0f96a46caebb06e0d21459c (patch)
treef38534679ed26ddf76357d2ddeb26757f1bc9410
downloadaur-31365d78608fdbe5f0f96a46caebb06e0d21459c.tar.gz
initial commit based on findpkg
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD48
-rw-r--r--findpkg.tmpfiles1
3 files changed, 67 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ce10d8f52ffd
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = findpkg-git
+ pkgdesc = A fast command not found hook
+ pkgver = 1.0.0.r3.g6dcc809
+ pkgrel = 1
+ url = https://github.com/Alexendoo/findpkg
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = cargo
+ depends = pacman
+ provides = findpkg
+ conflicts = findpkg
+ source = findpkg-git::git+https://github.com/Alexendoo/findpkg
+ source = findpkg.tmpfiles
+ sha256sums = SKIP
+ sha256sums = fc297fa1d14f4fd40282bf982f368aabd9f139792550031f0f2b289996b7b9d0
+
+pkgname = findpkg-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f155da45ab65
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Alex Macleod <alex@macleod.io>
+# Contributor: Luis Martinez <luis dot martinez at disroot dot org>
+
+pkgname=findpkg-git
+pkgver=1.0.0.r3.g6dcc809
+pkgrel=1
+pkgdesc="A fast command not found hook"
+arch=('x86_64')
+url="https://github.com/Alexendoo/findpkg"
+license=('MIT')
+depends=('pacman')
+makedepends=('git' 'cargo')
+provides=('findpkg')
+conflicts=('findpkg')
+source=("$pkgname::git+$url"
+ 'findpkg.tmpfiles')
+sha256sums=('SKIP'
+ 'fc297fa1d14f4fd40282bf982f368aabd9f139792550031f0f2b289996b7b9d0')
+
+pkgver() {
+ git -C "$pkgname" describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./'
+}
+
+prepare() {
+ cd "$pkgname"
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+}
+
+build() {
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ cd "$pkgname"
+ cargo build --release --frozen --all-features
+}
+
+check() {
+ cd "$pkgname"
+ cargo test --frozen --all-features
+}
+
+package() {
+ cd "$pkgname"
+ install -D target/release/findpkg -t "$pkgdir/usr/bin/"
+ install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
+ install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname/"
+ install -Dm644 systemd/* -t "$pkgdir/usr/lib/systemd/system/"
+ install -Dm644 "$srcdir/findpkg.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/findpkg.conf"
+}
diff --git a/findpkg.tmpfiles b/findpkg.tmpfiles
new file mode 100644
index 000000000000..915b6094322c
--- /dev/null
+++ b/findpkg.tmpfiles
@@ -0,0 +1 @@
+D /var/lib/findpkg