summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteelT2023-07-24 13:35:57 -0400
committerSteelT2023-07-24 13:39:40 -0400
commitd65cc8759328c9017c483dc1346bce57488861a0 (patch)
treeb660ae8214b22228ebff92facea5615333f6da77
parentcc0fb40c1c463a03a46d25f1c1ca964381747e31 (diff)
downloadaur-findpkg-git.tar.gz
Replace tmpfile with install script
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD12
-rw-r--r--findpkg.install13
-rw-r--r--findpkg.tmpfiles1
4 files changed, 20 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ce10d8f52ffd..122df70b1477 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,9 @@
pkgbase = findpkg-git
pkgdesc = A fast command not found hook
pkgver = 1.0.0.r3.g6dcc809
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/Alexendoo/findpkg
+ install = findpkg.install
arch = x86_64
license = MIT
makedepends = git
@@ -11,8 +12,6 @@ pkgbase = findpkg-git
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
index 6a58b494d779..d259a9e58752 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,9 @@
-# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
+# Maintainer: steelt <steeltitanium1 at gmail dot com>
# Contributor: Alex Macleod <alex@macleod.io>
pkgname=findpkg-git
pkgver=1.0.0.r3.g6dcc809
-pkgrel=1
+pkgrel=2
pkgdesc="A fast command not found hook"
arch=('x86_64')
url="https://github.com/Alexendoo/findpkg"
@@ -12,10 +12,9 @@ depends=('pacman')
makedepends=('git' 'cargo')
provides=('findpkg')
conflicts=('findpkg')
-source=("$pkgname::git+$url"
- 'findpkg.tmpfiles')
-sha256sums=('SKIP'
- 'fc297fa1d14f4fd40282bf982f368aabd9f139792550031f0f2b289996b7b9d0')
+install="${pkgname%-git}.install"
+source=("$pkgname::git+$url")
+sha256sums=('SKIP')
pkgver() {
git -C "$pkgname" describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./'
@@ -44,5 +43,4 @@ package() {
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.install b/findpkg.install
new file mode 100644
index 000000000000..d593d6d3b7c6
--- /dev/null
+++ b/findpkg.install
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+post_install() {
+ printf "==> Run 'findpkg --update' to initialize the database\n"
+}
+
+post_remove() {
+ # the database might not be removed, notify the user
+ if [[ -f /var/lib/findpkg/database ]]; then
+ printf "==> var/lib/findpkg/database has not been removed\n"
+ fi
+}
+
diff --git a/findpkg.tmpfiles b/findpkg.tmpfiles
deleted file mode 100644
index 915b6094322c..000000000000
--- a/findpkg.tmpfiles
+++ /dev/null
@@ -1 +0,0 @@
-D /var/lib/findpkg