commit 0d8df95527cfbfb4ace1a88ffaff7fdf825608ae Author: xhaa123 Date: Fri Nov 1 20:58:48 2024 +0800 dconf 0.40.0-1 diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..23fe9a5 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# This is an example PKGBUILD file. Use this as a start to creating your own, +# and remove these comments. For more information, see 'man PKGBUILD'. +# NOTE: Please fill out the license field for your package! If it is unknown, +# then please put 'unknown'. + +# Maintainer: Future Linux Team +pkgname=dconf +pkgver=0.40.0 +pkgrel=1 +pkgdesc="Configuration database system" +arch=('x86_64') +url="https://wiki.gnome.org/Projects/dconf" +license=('LGPL') +depends=('glibc') +makedepends=('vala' 'dbus' 'git' 'glib2' 'gtk-doc' 'python' 'meson' 'bash-completion') +backup=() +options=() +install=${pkgname}.install +source=(https://github.com/GNOME/dconf/archive/${pkgver}/${pkgname#*-}-${pkgver}.tar.gz + dconf-update + dconf-update.hook) +sha256sums=(SKIP + 330142605370f82f4229e8a94b245f911407eb629b50f1497f415c70164a90ec + 8d02176ff001a13d15a7ac087edd2502725494668933fa2c6e6f9cb21ae24e6b) + +build() { + cd ${pkgname}-${pkgver} + + ${FUTURE_MESON} \ + -D gtk_doc=true + + meson compile -C build +} + +package() { + cd ${pkgname}-${pkgver} + + meson install -C build --destdir ${pkgdir} + + install -Dt ${pkgdir}/usr/share/libalpm/hooks -m644 ${srcdir}/*.hook + install -Dt ${pkgdir}/usr/share/libalpm/scripts ${srcdir}/dconf-update + + # Prevent this directory from getting removed when other + # packages which install files there get uninstalled + install -Dm644 /dev/null ${pkgdir}/etc/dconf/db/.placeholder +} diff --git a/dconf-update b/dconf-update new file mode 100755 index 0000000..61d48a5 --- /dev/null +++ b/dconf-update @@ -0,0 +1,9 @@ +#!/bin/bash + +while read -r d; do + if [[ ! -d $d ]]; then + rm -f "${d%.d/}" + fi +done + +dconf update diff --git a/dconf-update.hook b/dconf-update.hook new file mode 100644 index 0000000..b3353c9 --- /dev/null +++ b/dconf-update.hook @@ -0,0 +1,12 @@ +[Trigger] +Type = Path +Operation = Install +Operation = Upgrade +Operation = Remove +Target = etc/dconf/db/*.d/ + +[Action] +Description = Updating system dconf databases... +When = PostTransaction +Exec = /usr/share/libalpm/scripts/dconf-update +NeedsTargets diff --git a/dconf.install b/dconf.install new file mode 100644 index 0000000..17e8573 --- /dev/null +++ b/dconf.install @@ -0,0 +1,9 @@ +post_install() { + post_upgrade $1 0 +} + +post_upgrade() { + if (( $(vercmp $2 0.32.0-2) < 0 )); then + dconf update + fi +}