dconf 0.40.0-1

This commit is contained in:
xhaa123 2024-11-01 20:58:48 +08:00
commit 0d8df95527
4 changed files with 76 additions and 0 deletions

46
PKGBUILD Normal file
View File

@ -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 <xhaa123@outlook.com>
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
}

9
dconf-update Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
while read -r d; do
if [[ ! -d $d ]]; then
rm -f "${d%.d/}"
fi
done
dconf update

12
dconf-update.hook Normal file
View File

@ -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

9
dconf.install Normal file
View File

@ -0,0 +1,9 @@
post_install() {
post_upgrade $1 0
}
post_upgrade() {
if (( $(vercmp $2 0.32.0-2) < 0 )); then
dconf update
fi
}