summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Crompton2016-03-08 17:46:36 +0100
committerJames Crompton2016-03-08 22:34:01 +0100
commita46e7d3f4aaff0b19b30418b2436d23932312a6d (patch)
treede17c9b8036cd362bdb8dddb2e1f7c5873e4d505
parent1c5fe0684c0e6cef5494f2e144f1e599c55123a8 (diff)
downloadaur-a46e7d3f4aaff0b19b30418b2436d23932312a6d.tar.gz
Share code with cewe-fotoservice package
-rw-r--r--PKGBUILD31
1 files changed, 18 insertions, 13 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b80f08df881a..c2bba99a0190 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,23 +1,32 @@
# Contributor: Jozef Riha <jose1711 at gmail dot com>
# Updated by Manuel Conzelmann, changed to non-branded software
+_keyaccount=16523
+_productUrname='Mein CEWE FOTOBUCH'
+_productRename='CEWE Fotobuch'
+_setupFilename='setup_Mein_CEWE_FOTOBUCH'
+
pkgname=cewe-fotobuch
+conflicts=(cewe-fotoservice)
+pkgdesc="an offline client for creating photobooks, uploading and ordering them at cewe.de"
+md5sums=('9197c2551c471da202de3f0652eba324'
+ '4df55a80124dc8555edf799bd566c5de')
+
+##########################################
+# remaining code shared with cewe-fotoservice
+
pkgver=6.1.3
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/$_keyaccount/hps/$_setupFilename.tgz"
'updater.pl')
-install=cewe-fotobuch.install
-md5sums=('9197c2551c471da202de3f0652eba324'
- '4df55a80124dc8555edf799bd566c5de')
+install=$pkgname.install
_installDir=/usr/share/$pkgname
-_productRename='CEWE Fotobuch'
pkgver() {
grep 'my $HPS_VER' $srcdir/install.pl | grep -Po '[\d\.]+'
@@ -50,7 +59,7 @@ package() {
cat > $pkgdir/usr/bin/$pkgname <<-EOF
#!/usr/bin/bash
cd ${_installDir#$pkgdir}
- KDEHOME=\$HOME/.kde4 exec ./$pkgname "\$@"
+ KDEHOME=\$HOME/.kde4 exec ./"$_productUrname" "\$@"
EOF
cat > $pkgdir/usr/share/applications/$pkgname.desktop <<-EOF
[Desktop Entry]
@@ -58,19 +67,15 @@ package() {
Name=$_productRename
Comment=Offline client for cewe.de service
Exec=$pkgname
- Icon=hps-16523
+ Icon=hps-$_keyaccount
StartupNotify=true
Categories=Graphics;Photography;
MimeType=application/x-hps-mcf
EOF
chmod 755 $pkgdir/usr/bin/$pkgname $pkgdir/usr/share/applications/$pkgname.desktop
- # utf-8 and space in executable filenames is generally a bad idea
- cd $_installDir
- mv "Mein CEWE FOTOBUCH" "$pkgname"
-
# adjust product name in mimetype comment
- sed -i "s/Mein CEWE FOTOBUCH/$_productRename/" $pkgdir/usr/share/mime/packages/*
+ sed -i "s/$_productUrname/$_productRename/" $pkgdir/usr/share/mime/packages/*
# remove unneeded mime cache files and installation logs
rm -d $pkgdir/usr/share/mime/application/* $pkgdir/usr/share/mime/* \
$_installDir/.log/* $_installDir/.log &> /dev/null || true