Date: Saturday, April 16, 2016 @ 02:30:47 Author: heftig Revision: 265032
0.15-3: Update to git; run via systemd --user Added: xdg-user-dirs/trunk/xdg-user-dirs-update.service xdg-user-dirs/trunk/xdg-user-dirs.install Modified: xdg-user-dirs/trunk/PKGBUILD Deleted: xdg-user-dirs/trunk/60-xdg-user-dirs.sh ------------------------------+ 60-xdg-user-dirs.sh | 5 ----- PKGBUILD | 28 ++++++++++++++++++---------- xdg-user-dirs-update.service | 10 ++++++++++ xdg-user-dirs.install | 14 ++++++++++++++ 4 files changed, 42 insertions(+), 15 deletions(-) Deleted: 60-xdg-user-dirs.sh =================================================================== --- 60-xdg-user-dirs.sh 2016-04-15 22:06:58 UTC (rev 265031) +++ 60-xdg-user-dirs.sh 2016-04-16 00:30:47 UTC (rev 265032) @@ -1,5 +0,0 @@ -#!/bin/sh -# Set up user directories like ~/Desktop and ~/Music -if [ -x /usr/bin/xdg-user-dirs-update ]; then - /usr/bin/xdg-user-dirs-update -fi Modified: PKGBUILD =================================================================== --- PKGBUILD 2016-04-15 22:06:58 UTC (rev 265031) +++ PKGBUILD 2016-04-16 00:30:47 UTC (rev 265032) @@ -5,27 +5,35 @@ pkgname=xdg-user-dirs pkgver=0.15 -pkgrel=2 +pkgrel=3 pkgdesc="Manage user directories like ~/Desktop and ~/Music" arch=(i686 x86_64) url="http://www.freedesktop.org/wiki/Software/xdg-user-dirs" license=(GPL) -depends=(sh) -makedepends=(docbook-xsl) +depends=(sh systemd) +makedepends=(docbook-xsl git) backup=(etc/xdg/user-dirs.conf etc/xdg/user-dirs.defaults) -source=(http://user-dirs.freedesktop.org/releases/$pkgname-$pkgver.tar.gz - 60-xdg-user-dirs.sh) -sha256sums=('20b4a751f41d0554bce3e0ce5e8d934be98cc62d48f0b90a894c3e1916552786' - '328ae6908bff2842ea0960730b7d4802bdce66473768e38ebc9368ce78da7156') +install=xdg-user-dirs.install +_commit=1cf7d3fd7ac6514bce9af8c8114f38c51d3de441 +source=("git+https://anongit.freedesktop.org/git/xdg/$pkgname#commit=$_commit" + xdg-user-dirs-update.service) +sha256sums=('SKIP' + '53c75f52d782e9492601400236bc8e5bfa76a26f0afd9bce3fe8df1740d341f0') +prepare() { + cd $pkgname + NOCONFIGURE=1 ./autogen.sh +} + build() { - cd $pkgname-$pkgver + cd $pkgname ./configure --prefix=/usr --sysconfdir=/etc make } package() { - cd $pkgname-$pkgver + cd $pkgname make DESTDIR="$pkgdir" install - install -D ../60-xdg-user-dirs.sh "$pkgdir/etc/X11/xinit/xinitrc.d/60-xdg-user-dirs.sh" + install -D ../xdg-user-dirs-update.service \ + "$pkgdir/usr/lib/systemd/user/xdg-user-dirs-update.service" } Added: xdg-user-dirs-update.service =================================================================== --- xdg-user-dirs-update.service (rev 0) +++ xdg-user-dirs-update.service 2016-04-16 00:30:47 UTC (rev 265032) @@ -0,0 +1,10 @@ +[Unit] +Description=Update XDG user dir configuration +Documentation=man:xdg-user-dirs-update(1) + +[Service] +Type=oneshot +ExecStart=/usr/bin/xdg-user-dirs-update + +[Install] +WantedBy=default.target Added: xdg-user-dirs.install =================================================================== --- xdg-user-dirs.install (rev 0) +++ xdg-user-dirs.install 2016-04-16 00:30:47 UTC (rev 265032) @@ -0,0 +1,14 @@ +post_install() { + # Enable update by default + systemctl --global enable xdg-user-dirs-update.service +} + +post_upgrade() { + if (( $(vercmp $2 0.15-3) < 0)); then + systemctl --global enable xdg-user-dirs-update.service + fi +} + +pre_remove() { + systemctl --global disable xdg-user-dirs-update.service +}