Date: Thursday, October 22, 2015 @ 12:35:44
  Author: fyan
Revision: 144688

upgpkg: toxcore 3523-2

- add missing backup array
- install datadir
- create user for upgrading, too

Modified:
  toxcore/trunk/PKGBUILD
  toxcore/trunk/toxcore.install

-----------------+
 PKGBUILD        |    3 ++-
 toxcore.install |    8 +++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2015-10-22 10:12:12 UTC (rev 144687)
+++ PKGBUILD    2015-10-22 10:35:44 UTC (rev 144688)
@@ -8,7 +8,7 @@
 pkgname=toxcore
 pkgver=3523
 _commit=a25cc96b4f2aeaca169df834e39df796ac08f1bd
-pkgrel=1
+pkgrel=2
 pkgdesc='Secure, configuration-free, P2P Skype replacement backend'
 arch=('i686' 'x86_64')
 url='https://tox.chat'
@@ -17,6 +17,7 @@
 makedepends=('git' 'check')
 conflicts=("tox")
 provides=("tox")
+backup=('etc/tox-bootstrapd.conf')
 install=$pkgname.install
 source=("git+https://github.com/irungentoo/toxcore.git#commit=$_commit";
         'toxcore.conf')

Modified: toxcore.install
===================================================================
--- toxcore.install     2015-10-22 10:12:12 UTC (rev 144687)
+++ toxcore.install     2015-10-22 10:35:44 UTC (rev 144688)
@@ -1,3 +1,9 @@
 post_install() {
   systemd-sysusers toxcore.conf
-}
\ No newline at end of file
+  [[ -d var/lib/tox-bootstrapd ]] || install -dm 750 -o tox-bootstrapd -g 
tox-bootstrapd var/lib/tox-bootstrapd
+}
+
+post_upgrade() {
+  (( $(vercmp $2 '3523-1') < 0 )) && systemd-sysusers toxcore.conf || true
+  (( $(vercmp $2 '3523-2') < 0 )) && ([[ -d var/lib/tox-bootstrapd ]] || 
install -dm 750 -o tox-bootstrapd -g tox-bootstrapd var/lib/tox-bootstrapd || 
true
+}

Reply via email to