summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzoe2021-06-13 16:32:11 +0200
committerzoe2021-06-13 16:32:11 +0200
commitb138b63ae73041eae4f328c265435d4f6caf6db7 (patch)
tree57ab193b657089eef05a2772d9e00c1be866a35f
downloadaur-b138b63ae73041eae4f328c265435d4f6caf6db7.tar.gz
Initial import
-rw-r--r--.SRCINFO32
-rw-r--r--PKGBUILD91
-rw-r--r--cewe-monlivrephoto-fr.install18
-rw-r--r--updater.pl29
4 files changed, 170 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..eaae2b458ab7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,32 @@
+pkgbase = cewe-monlivrephoto-fr
+ pkgdesc = Création off-line de livres-photos, calendriers, posters…, disponibles ensuite en ligne auprès de cewe.fr (France)
+ pkgver = 7.1.3
+ pkgrel = 1
+ url = https://www.cewe.fr/
+ install = cewe-monlivrephoto-fr.install
+ arch = i686
+ arch = x86_64
+ license = custom:eula
+ makedepends = unzip
+ makedepends = xdg-utils
+ depends = libx11
+ depends = libjpeg
+ depends = curl
+ depends = wget
+ depends = snappy
+ conflicts = cewe-monlivrephoto-fnac
+ conflicts = cewe-monlivrephoto
+ conflicts = cewe-fotowelt
+ conflicts = cewe-fotobuch
+ conflicts = cewe-fotoservice
+ conflicts = mullerfoto-fotostar_de
+ conflicts = mullerfoto-fotostar_cz
+ conflicts = mullerfoto-fotostar_sk
+ source = http://dls.photoprintit.com/download/Data/7884-fr_FR/hps/setup_Logiciel_de_creation_CEWE.tgz
+ source = updater.pl
+ source = cewe-monlivrephoto-fr.install
+ md5sums = SKIP
+ md5sums = 816ecb83b920d7128d70a697fa384130
+ md5sums = 98a86bbf8e9c378e1bddf0f4d2440884
+
+pkgname = cewe-monlivrephoto-fr
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e5a086c98208
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,91 @@
+# Maintainer: zoe <chp321 [at] gmail [dot] com>
+# Contributor: Arnaud Sevin <nono31 [at] gmail [dot] com>, repo at https://github.com/nono031/cewe-monlivrephoto.git
+# Contributor: Jozef Riha <jose1711 at gmail dot com>
+# Contributor: ManU <manolo89 [at] online [dot] de>
+# Contributor: DonJaime <DonJaime [at] freenet [dot] de>
+# forked from cewe-fotoservice by James Crompton, itself forked from cewe-fotobuch, originally by Jozef Riha, updated by Manuel Conzelmann
+# Updated by Zoe <chp321 at gmail dot com>, for french version
+
+_keyaccount=7884
+# what they call their package ($APPLICATION_NAME in install.pl)
+_productUrname='Logiciel de création CEWE'
+# what I want to call it ; UTF-8 does not like accents
+_productRename='Logiciel_de_creation_CEWE'
+_setupFilename='setup_Logiciel_de_creation_CEWE'
+
+pkgname=cewe-monlivrephoto-fr
+conflicts=('cewe-monlivrephoto-fnac' 'cewe-monlivrephoto' 'cewe-fotowelt' 'cewe-fotobuch' 'cewe-fotoservice' 'mullerfoto-fotostar_de' 'mullerfoto-fotostar_cz' 'mullerfoto-fotostar_sk')
+pkgdesc="Création off-line de livres-photos, calendriers, posters…, disponibles ensuite en ligne auprès de cewe.fr (France)"
+# setup_Logiciel_de_creation_CEWE (script perl) is versatile too much, so it is better to skip its md5sum :
+md5sums=(SKIP
+ '816ecb83b920d7128d70a697fa384130' ## updater.pl
+ '98a86bbf8e9c378e1bddf0f4d2440884') ## $pkgname.install
+
+pkgver=7.1.3
+pkgrel=1
+url="https://www.cewe.fr/"
+license=("custom:eula")
+#depends=('libx11' 'libjpeg' 'curl' 'wget' 'gstreamer0.10-base-plugins' 'snappy')
+depends=('libx11' 'libjpeg' 'curl' 'wget' 'snappy')
+makedepends=('unzip' 'xdg-utils')
+arch=('i686' 'x86_64')
+source=("http://dls.photoprintit.com/download/Data/$_keyaccount-fr_FR/hps/$_setupFilename.tgz"
+ 'updater.pl' "$pkgname.install")
+install=$pkgname.install
+_installDir=/usr/share/$pkgname
+
+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
+ 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, 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 -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/$pkgname.xpm
+
+ # 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 cewe.fr service, non-branded french version
+ 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
+
+ # 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
+}
diff --git a/cewe-monlivrephoto-fr.install b/cewe-monlivrephoto-fr.install
new file mode 100644
index 000000000000..58f14409912b
--- /dev/null
+++ b/cewe-monlivrephoto-fr.install
@@ -0,0 +1,18 @@
+post_install() {
+ echo '--------------------------------------------------'
+ echo 'You *MUST* read and agree to the license stored in'
+ echo '/usr/share/cewe-monlivrephoto-fr/EULA.txt before'
+ echo 'you start using it'
+ echo '--------------------------------------------------'
+
+ chmod 775 /usr/share/cewe-monlivrephoto-fr
+ /bin/true
+}
+
+post_upgrade() {
+/bin/true
+}
+
+pre_remove() {
+/bin/true
+}
diff --git a/updater.pl b/updater.pl
new file mode 100644
index 000000000000..3811adce0beb
--- /dev/null
+++ b/updater.pl
@@ -0,0 +1,29 @@
+#! /usr/bin/perl -w
+
+################################################################################
+# Replacement updater script for AUR package
+################################################################################
+use strict;
+use Getopt::Long;
+
+my $installer = "";
+
+GetOptions("installer=s" => \$installer);
+
+unless ($installer =~ /(Logiciel_de_création_CEWE|Mon_LIVRE_PHOTO_CEWE)/){
+ print "\033[1;31mNo AUR package available for this update ('$installer').\033[0m"
+}else{
+
+ my $pkgName = $1 eq 'Logiciel_de_création_CEWE' ? 'cewe-monlivrephoto-fr';
+
+ chdir('/tmp');
+ system("wget https://aur.archlinux.org/cgit/aur.git/snapshot/$pkgName.tar.gz -O $pkgName.tar.gz");
+ system("tar -xvf $pkgName.tar.gz");
+
+ chdir($pkgName);
+ system("mv '$installer' ./");
+ system('_UPDATING=1 makepkg --install --clean --skipchecksums');
+}
+
+print "\nNow you can close this window\n";
+my $input = <STDIN>;