diff --git a/pack.d/faststone-image-viewer.sh b/pack.d/faststone-image-viewer.sh new file mode 100644 index 0000000000000000000000000000000000000000..72fa5c0c724bd153f485be14710edd846278999e --- /dev/null +++ b/pack.d/faststone-image-viewer.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +TAR="$1" +RETURNTARNAME="$2" +VERSION="$3" + +. $(dirname $0)/common.sh + +PKGNAME=$PRODUCT-$VERSION.tar + +erc unpack $TAR || fatal +mkdir -p opt/eepm-wine/$PRODUCT/ + +mv FSViewer*/* opt/eepm-wine/$PRODUCT/ + +cat <<EOF >opt/eepm-wine/$PRODUCT/run.sh +#!/bin/sh +RUNFILE="/opt/eepm-wine/faststone-image-viewer/FSViewer.exe" +exec wine "\$RUNFILE" "\$@" +EOF +chmod 755 opt/eepm-wine/$PRODUCT/run.sh + +erc pack $PKGNAME opt/eepm-wine + +return_tar $PKGNAME diff --git a/play.d/faststone-image-viewer.sh b/play.d/faststone-image-viewer.sh new file mode 100755 index 0000000000000000000000000000000000000000..ce88b465a20c862883a81109b0cccbeb2d02ae82 --- /dev/null +++ b/play.d/faststone-image-viewer.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +PKGNAME=faststone-image-viewer +SUPPORTEDARCHES="x86_64" +VERSION="$2" +DESCRIPTION='An image browser, converter and editor that supports all major graphic formats.' +URL="https://www.faststone.org/FSViewerDetail.htm" + +. $(dirname $0)/common.sh + +warn_version_is_not_supported + +VERSION=$(eget -q -O- "https://www.faststone.org/FSViewerDetail.htm" | grep -o -m 1 "Version [0-9.]\+" | awk '{print $2}') + +PKGURL="https://www.faststonesoft.net/DN/FSViewer${VERSION//./}.zip" + +install_pack_pkgurl $VERSION + + diff --git a/repack.d/faststone-image-viewer.sh b/repack.d/faststone-image-viewer.sh new file mode 100644 index 0000000000000000000000000000000000000000..6fca0884f708b913ee0b4c3394f3fe454c754749 --- /dev/null +++ b/repack.d/faststone-image-viewer.sh @@ -0,0 +1,29 @@ +#!/bin/sh -x +# It will run with two args: buildroot spec +BUILDROOT="$1" + +SPEC="$2" + +PRODUCT=faststone-image-viewer +PRODUCTDIR=/opt/eepm-wine/$PRODUCT + +. $(dirname $0)/common.sh + +add_requires '/usr/bin/wine' + +add_bin_link_command $PRODUCT $PRODUCTDIR/run.sh + +cat <<EOF | create_file /usr/share/applications/$PRODUCT.desktop +[Desktop Entry] +Name=Faststone image viewer +Exec=$PRODUCT %F +Type=Application +StartupNotify=true +Icon=$PRODUCT +StartupWMClass=FSViewer.exe +Categories=Wine;Graphics; +EOF + +# copied from unpacked exe file: FSViewer.exe +i=128 +install_file ipfs://QmTQMybWanVQBrV5diGrKDnMbU3zWXtG26uTJ8bcjcKKMp /usr/share/icons/hicolor/${i}x${i}/apps/$PRODUCT.png