Date: Sunday, April 24, 2016 @ 11:04:33 Author: arojas Revision: 171689
Use a hook to update the appstream database after modifying data Added: appstream/trunk/update-appstream-db.hook Modified: appstream/trunk/PKGBUILD --------------------------+ PKGBUILD | 9 ++++++--- update-appstream-db.hook | 11 +++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2016-04-24 07:45:01 UTC (rev 171688) +++ PKGBUILD 2016-04-24 09:04:33 UTC (rev 171689) @@ -6,7 +6,7 @@ pkgbase=appstream pkgname=(appstream appstream-qt) pkgver=0.9.4 -pkgrel=1 +pkgrel=2 pkgdesc="Provides a standard for creating app stores across distributions" arch=(i686 x86_64) url="http://distributions.freedesktop.org/wiki/AppStream" @@ -13,8 +13,9 @@ license=(GPL) depends=(xapian-core polkit libyaml libxml2 protobuf) makedepends=(cmake xmlto intltool gobject-introspection python2 docbook-xsl qt5-base) -source=("http://www.freedesktop.org/software/appstream/releases/AppStream-$pkgver.tar.xz") -sha256sums=('b9ed14e2af7956252b0326661c8b558466a0297560851ba7a35ecb65489c8815') +source=("http://www.freedesktop.org/software/appstream/releases/AppStream-$pkgver.tar.xz" update-appstream-db.hook) +sha256sums=('b9ed14e2af7956252b0326661c8b558466a0297560851ba7a35ecb65489c8815' + '6aced8f86854a3701879333de84cb5a0cc77f345d655a91e1a65f63c459f00dc') prepare() { mkdir -p build @@ -37,6 +38,8 @@ # provided by -qt subpackage rm -r "$pkgdir"/usr/{include/AppstreamQt,lib/cmake,lib/libAppstreamQt.*} + + install -Dm644 "$srcdir"/update-appstream-db.hook "$pkgdir"/usr/share/libalpm/hooks/update-appstream-db.hook } package_appstream-qt() { Added: update-appstream-db.hook =================================================================== --- update-appstream-db.hook (rev 0) +++ update-appstream-db.hook 2016-04-24 09:04:33 UTC (rev 171689) @@ -0,0 +1,11 @@ +[Trigger] +Type = File +Operation = Install +Operation = Upgrade +Operation = Remove +Target = usr/share/app-info/xmls/*.xml + +[Action] +Description = Updating the appstream database... +When = PostTransaction +Exec = /usr/bin/appstreamcli refresh-index --force
