Date: Tuesday, June 16, 2020 @ 02:36:05 Author: felixonmars Revision: 645753
upgpkg: deepin-api 5.2.0.1-2: fix homedir for deepin-sound-player Added: deepin-api/trunk/deepin-api.install Modified: deepin-api/trunk/PKGBUILD deepin-api/trunk/deepin-api.sysusers ---------------------+ PKGBUILD | 5 +++-- deepin-api.install | 16 ++++++++++++++++ deepin-api.sysusers | 3 +-- 3 files changed, 20 insertions(+), 4 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2020-06-16 02:35:40 UTC (rev 645752) +++ PKGBUILD 2020-06-16 02:36:05 UTC (rev 645753) @@ -4,7 +4,7 @@ pkgname=deepin-api pkgver=5.2.0.1 -pkgrel=1 +pkgrel=2 pkgdesc='Golang bindings for dde-daemon' arch=('x86_64') url="https://github.com/linuxdeepin/dde-api" @@ -17,10 +17,11 @@ 'golang-github-nfnt-resize' 'bzr' 'go-pie') provides=('golang-deepin-dde-api') groups=('deepin') +install=deepin-api.install source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/dde-api/archive/$pkgver.tar.gz" deepin-api.sysusers) sha512sums=('3f562291c12f071a9579802f2a8f5cdd224b48451e5e8c3b4d8e3a770f9f883218af4c4b37cb5c9b60608447399526181ea234b587bb68fddd0260ae4b484cd2' - '548b4c8d06a10f0103d84fe6b68532ca71aae53347a6ad85dad1d274844146c9861d1bf6ce8e5518ea1b043aa082d705c534f0a4c0feb16a031537cee6befb08') + 'e894eb3928af9e244fa78010fdf16c8abb6ce18df114cf05327d02b18774d6ba5b023e4dfa0d07042f4e44a5c6e2ddb55b07f3e0db466a0e6169b52465fdefd6') prepare() { export GOPATH="$srcdir/build:/usr/share/gocode" Added: deepin-api.install =================================================================== --- deepin-api.install (rev 0) +++ deepin-api.install 2020-06-16 02:36:05 UTC (rev 645753) @@ -0,0 +1,16 @@ +post_install() { + # We need to know uid and gid to create /var/lib/deepin-sound-player with proper + # permissions. So keep systemd-sysusers invocation here despite having + # pacman hooks. + systemd-sysusers deepin-sound-player.conf + mkdir -p var/lib/deepin-sound-player + chown -R deepin-sound-player:deepin-sound-player var/lib/deepin-sound-player +} + +post_upgrade() { + if (( $(vercmp $2 5.2.0.1-2) < 0)); then + usermod -d /var/lib/deepin-sound-player deepin-sound-player + mkdir -p var/lib/deepin-sound-player + chown -R deepin-sound-player:deepin-sound-player var/lib/deepin-sound-player + fi +} Modified: deepin-api.sysusers =================================================================== --- deepin-api.sysusers 2020-06-16 02:35:40 UTC (rev 645752) +++ deepin-api.sysusers 2020-06-16 02:36:05 UTC (rev 645753) @@ -1,2 +1 @@ -u deepin-sound-player - "Deepin Sound Player" -g deepin-sound-player - +u deepin-sound-player - "Deepin Sound Player" /var/lib/deepin-sound-player