summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO11
-rw-r--r--PKGBUILD14
-rw-r--r--pkgfile.hook11
3 files changed, 36 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..aa8b880a658c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,11 @@
+pkgbase = pacman-pkgfile-hook
+ pkgdesc = Pacman hook to update the pkgfile database.
+ pkgver = 1.0.0
+ pkgrel = 1
+ arch = any
+ depends = pkgfile
+ source = pkgfile.hook
+ md5sums = SKIP
+
+pkgname = pacman-pkgfile-hook
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d2ccc0f002a3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,14 @@
+# Maintainer: Lars Rustand <rustand dot lars at gmail dot com>
+pkgname=pacman-pkgfile-hook
+pkgver=1.0.0
+pkgrel=1
+pkgdesc='Pacman hook to update the pkgfile database.'
+arch=('any')
+depends=('pkgfile')
+source=('pkgfile.hook')
+md5sums=('fb898371b45dbb50e35404ac9be8a43b')
+
+package() {
+ install -D -m0644 "${srcdir}/pkgfile.hook" "${pkgdir}/usr/share/libalpm/hooks/pkgfile.hook"
+}
+
diff --git a/pkgfile.hook b/pkgfile.hook
new file mode 100644
index 000000000000..18bb465aaf0d
--- /dev/null
+++ b/pkgfile.hook
@@ -0,0 +1,11 @@
+[Trigger]
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Type = Package
+Target = *
+
+[Action]
+Description = Updating pkgfile database
+When = PostTransaction
+Exec = /bin/sh -c 'pkgfile --update --quiet <&- >&- 2>&- &'