summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJames Crompton2016-03-07 09:42:51 +0100
committerJames Crompton2016-03-08 22:34:01 +0100
commit5cbba62b5d33cc2e12c46d67ec8f7dd2271bf12c (patch)
tree63a6ca3841ac4ded7e45c2f55d8869be7ad2470e /PKGBUILD
parent66a0439e7cc53fb16d4e7cde1f62a42ceccfab51 (diff)
downloadaur-5cbba62b5d33cc2e12c46d67ec8f7dd2271bf12c.tar.gz
Allow for update from within application
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD17
1 files changed, 13 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 8aab35f9dbb7..663910c9fc70 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,20 +3,26 @@
pkgname=cewe-fotobuch
pkgver=6.1.3
-pkgrel=2
+pkgrel=3
pkgdesc="an offline client for creating photobooks, uploading and ordering them at cewe.de"
url="http://www.cewe.de/"
license=("custom:eula")
depends=('libx11' 'libjpeg' 'curl' 'wget')
makedepends=('unzip')
arch=('i686' 'x86_64')
-source=("http://dls.photoprintit.de/download/Data/16523/hps/setup_Mein_CEWE_FOTOBUCH.tgz")
+source=("http://dls.photoprintit.de/download/Data/16523/hps/setup_Mein_CEWE_FOTOBUCH.tgz"
+ 'updater.pl')
install=cewe-fotobuch.install
-md5sums=('9197c2551c471da202de3f0652eba324')
+md5sums=('9197c2551c471da202de3f0652eba324'
+ '4df55a80124dc8555edf799bd566c5de')
_installDir=/usr/share/$pkgname
_productRename='CEWE Fotobuch'
+pkgver() {
+ grep 'my $HPS_VER' $srcdir/install.pl | grep -Po '[\d\.]+'
+}
+
package() {
# put icons and mimetype in the right place
export XDG_UTILS_INSTALL_MODE=system
@@ -31,8 +37,11 @@ package() {
# don't show EULA/ask for confirmation if cewe-fotobuch is already installed
which cewe-fotobuch &>/dev/null && update='--update'
+ # keep packages unless updating from within application
+ [[ -z "$_UPDATING" ]] && keepPackages='-k' || update='--upgrade'
- ./install.pl $update --installDir=$_installDir -k -v
+ ./install.pl $update $keepPackages --installDir=$_installDir -v
+ install -m644 -b updater.pl $_installDir/updater.pl
install -D -m644 $srcdir/EULA.txt $pkgdir/usr/share/licenses/$pkgname/EULA.txt
# pixmap for legacy customised mimetypes
install -D -m644 $_installDir/Resources/keyaccount/32.xpm $pkgdir/usr/share/pixmaps/cewe-fotobuch.xpm