blob: 33937b792aa16295cf7f86f1f35eef808772da11 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
# Contributor: Jozef Riha <jose1711 at gmail dot com>
# Updated by Manuel Conzelmann, changed to non-branded software
# for dm Fotowelt: based on PKGBUILD of https://aur.archlinux.org/packages/cewe-fotobuch/
_keyaccount=1320
_productUrname='dm Fotowelt'
_productRename='dm Fotowelt'
_lang='de_DE'
pkgname=dm-fotowelt
pkgdesc='an offline client for creating photobooks, greeting cards, posters and more, uploading and ordering them at fotoparadies.de'
sha256sums=('cf4ae2955cb6e0c6e6b128b3ab5c64dd5b6831ffd9466d5a3ef3567df5710501')
pkgver=8.0.3
pkgrel=1
url="https://www.fotoparadies.de/"
license=("custom:eula")
depends=('libx11' 'libjpeg' 'curl' 'wget' 'snappy' 'libxcrypt-compat')
conflicts=(cewe-fotowelt cewe-fotobuch cewe-fotoservice cewe-monlivrephoto-fnac cewe-monlivrephoto-fr)
makedepends=('p7zip' 'xdg-utils')
arch=('i686' 'x86_64')
# https://dls.photoprintit.com/api/getClient/1320-de_DE/hps/x_x_x_x_24441_x_24441-0yELEgWuBDCUV/linux
source=("https://dls.photoprintit.com/download/Data/$_keyaccount-$_lang/hps/setup_${_productUrname// /_}.tgz")
install=$pkgname.install
options=(!strip)
_installDir=/usr/share/$pkgname
pkgver() {
grep 'my $HPS_VER' $srcdir/install.pl | grep -Po '[[:digit:]\.]+'
}
package() {
# put icons and mimetype in the right place
export XDG_UTILS_INSTALL_MODE=system
export XDG_DATA_DIRS="$pkgdir/usr/share:"
_installDir=$pkgdir$_installDir
mkdir -p $_installDir $pkgdir/usr/{bin,share/icons/hicolor,share/mime/packages,share/applications}
cd $srcdir
# don't clear screen, fail to update system mime database, install broken desktop file, or burble
sed -i 's/^\s*\(system("clear"\|system("update-mime-database \|createDesktopShortcuts(\|printf(\$TRANSLATABLE\).*;//' install.pl
# don't show EULA/ask for confirmation (EULA is addressed in install script)
update='--update'
# keep packages unless updating from within application
[[ -z "$_UPDATING" ]] && keepPackages='-k' || update='--upgrade'
./install.pl $update $keepPackages --installDir=$_installDir -v
install -D -m644 $srcdir/EULA.txt $pkgdir/usr/share/licenses/$pkgname/EULA.txt
# create startup script and desktop file
cat > $pkgdir/usr/bin/$pkgname <<-EOF
#!/usr/bin/bash
cd ${_installDir#$pkgdir}
# nouveau bug with QT web engine: https://bugreports.qt.io/browse/QTBUG-41242
lsmod | grep nouveau && export QT_XCB_FORCE_SOFTWARE_OPENGL=1
exec ./"${_productUrname// /-}" "\$@"
EOF
cat > $pkgdir/usr/share/applications/$pkgname.desktop <<-EOF
[Desktop Entry]
Type=Application
Name=$_productRename
Comment=Offline client for fotoparadies.de service
Exec=$pkgname
Icon=hps-$_keyaccount-$pkgver
StartupNotify=true
Categories=Graphics;Photography;
MimeType=application/x-hps-mcf
EOF
chmod 755 $pkgdir/usr/bin/$pkgname $pkgdir/usr/share/applications/$pkgname.desktop $(find $_installDir -type d)
# adjust product name in mimetype comment
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
echo
}
# template end;
|