diff options
author | Giancarlo Dessì <slack@giand.it> | 2023-06-02 21:36:37 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-06-03 10:38:23 +0700 |
commit | e8622c06b4d4a99555b91eb256a3eda6c3f1e655 (patch) | |
tree | 8c459b49f96ca6381d9f300e2c32c34b2457a786 /graphics/FotoKilof | |
parent | 75ba159872695e2e9cd600d6b22866d8e85f8f06 (diff) |
graphics/FotoKilof: Added (graphic interface for ImageMagick)
Signed-off-by: bedlam <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics/FotoKilof')
-rw-r--r-- | graphics/FotoKilof/FotoKilof.SlackBuild | 154 | ||||
-rw-r--r-- | graphics/FotoKilof/FotoKilof.info | 10 | ||||
-rw-r--r-- | graphics/FotoKilof/README | 23 | ||||
-rw-r--r-- | graphics/FotoKilof/doinst.sh | 13 | ||||
-rw-r--r-- | graphics/FotoKilof/icon.png | bin | 0 -> 35212 bytes | |||
-rw-r--r-- | graphics/FotoKilof/move_fotokilof-to-__main__.patch | 94 | ||||
-rw-r--r-- | graphics/FotoKilof/slack-desc | 19 |
7 files changed, 313 insertions, 0 deletions
diff --git a/graphics/FotoKilof/FotoKilof.SlackBuild b/graphics/FotoKilof/FotoKilof.SlackBuild new file mode 100644 index 0000000000000..af907a449ef75 --- /dev/null +++ b/graphics/FotoKilof/FotoKilof.SlackBuild @@ -0,0 +1,154 @@ +#!/bin/bash + +# Slackware build script for FotoKilof + +# Copyright 2023 Giancarlo Dessì, Cagliari, IT +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=FotoKilof +VERSION=${VERSION:-4.3.2} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# Global patch to allow the build from source without postinstall issues +# occurred in Slackware: fotokilof.py must be moved to __main__.py +# Thanks to Team-TL aka Tomasz Łuczak for the support +patch -p0 < $CWD/move_fotokilof-to-__main__.patch +mv ./fotokilof/fotokilof.py ./fotokilof/__main__.py + +python3 setup.py install --root=$PKG + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +#Install the application icon and desktop entry +mkdir -p $PKG/usr/share/icons/hicolor/256x256/apps +cp -a $CWD/icon.png $PKG/usr/share/icons/hicolor/256x256/apps/fotokilof.png + +mkdir -p $PKG/usr/share/applications +cat << EOF > $PKG/usr/share/applications/fotokilof.desktop +[Desktop Entry] +Type=Application +Name=FotoKilof +GenericName=Graphical Interface for ImageMagick +GenericName[bg]=Графичен интерфейс за ImageMagick +GenericName[de]=Grafische Benutzeroberfläche für ImageMagick +GenericName[es]=Interfaz gráfica para ImageMagick +GenericName[fr]=Interface graphique pour ImageMagick +GenericName[id]=Antarmuka Grafis untuk ImageMagick +GenericName[it]=Interfaccia grafica per ImageMagick +GenericName[pl]=Interfejs graficzny dla ImageMagick +GenericName[pt]=Interface Gráfica para ImageMagick +GenericName[tr]=ImageMagick için Grafik Arayüzü +Comment=Graphical Interface to various ImageMagick functions for processing pictures +Comment[bg]=Графичен интерфейс към различни функции на ImageMagick за обработка на снимки +Comment[de]=Grafische Benutzeroberfläche zu verschiedenen ImageMagick-Funktionen zur Bildbearbeitung +Comment[es]=Interfaz gráfica para varias funciones de ImageMagick para el procesamiento de imágenes +Comment[fr]=Interface graphique vers diverses fonctions ImageMagick pour le traitement des images +Comment[id]=Antarmuka Grafis ke berbagai fungsi ImageMagick untuk memproses gambar +Comment[it]=Interfaccia grafica a varie funzioni di ImageMagick per l'elaborazione delle immagini +Comment[pl]=Interfejs graficzny do różnych funkcji ImageMagick do przetwarzania obrazów +Comment[pt]=Interface gráfica para várias funções do ImageMagick para processamento de imagens +Comment[tr]=Resimleri işlemek için çeşitli ImageMagick işlevlerine Grafik Arayüzü +Exec=/usr/bin/fotokilof +Icon=/usr/share/icons/hicolor/256x256/apps/fotokilof.png +Terminal=false +Categories=Graphics; +StartupNotify=true +MimeType=image/jpeg;image/png;image/tiff; + +EOF + +# Create manually and install an executable python script needed to +# launch the application (Derived from the FotoKilof package installed with pip) +mkdir -p $PKG/usr/bin +cat << 'EOF' > $PKG/usr/bin/fotokilof +#!/usr/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from fotokilof import __main__ +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(__main__()) + +EOF + +chmod 755 $PKG/usr/bin/fotokilof + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a *.md $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/graphics/FotoKilof/FotoKilof.info b/graphics/FotoKilof/FotoKilof.info new file mode 100644 index 0000000000000..16699608e6f68 --- /dev/null +++ b/graphics/FotoKilof/FotoKilof.info @@ -0,0 +1,10 @@ +PRGNAM="FotoKilof" +VERSION="4.3.2" +HOMEPAGE="https://github.com/TeaM-TL/FotoKilof" +DOWNLOAD="https://github.com/TeaM-TL/FotoKilof/archive/4.3.2/FotoKilof-4.3.2.tar.gz" +MD5SUM="36ee5d7e6db63772cf536d496b16e87d" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="python-wand ttkbootstrap" +MAINTAINER="Giancarlo Dessì" +EMAIL="slack@giand.it" diff --git a/graphics/FotoKilof/README b/graphics/FotoKilof/README new file mode 100644 index 0000000000000..167cd0441d7b0 --- /dev/null +++ b/graphics/FotoKilof/README @@ -0,0 +1,23 @@ +FotoKilof is a Graphical User Interface for ImageMagick and Wand +that allows, as alternative to command line approach, the processing +of pictures and other graphic files in JPEG, PNG, TIFF, and (for +import) SVG formats. + +FotoKilof does not give access to the whole functionality of +ImageMagick, but it supports most of its usual functions and features, +so may be useful for users that have no familiarity with the shell +interface to ImageMagick. Also, the preview features allow to prevent +errors from accidental overwriting of a number of pictures by setting +incorrect options to ImageMagick commands, i.e. when users crop or +resize images. + +FotoKilof supports common kinds of graphic conversion like resizing, +crop, rotation, mirroring, addition of text, logos, borders, +conversion in other formats, applying of filters or effects (sepia, +black-white, equalization, contrast increase/decrease, histogram +stretching, ecc.). For a full information about features and functions +of FotoKilof please see the home page of the project. + +FotoKilof is written in Python and its GUI uses tkinter (already +included in the Slackware's Python 3 package), the python theme engine +for Tk, so your system must have the Tk/Tcl platform installed. diff --git a/graphics/FotoKilof/doinst.sh b/graphics/FotoKilof/doinst.sh new file mode 100644 index 0000000000000..aea0f894eb32b --- /dev/null +++ b/graphics/FotoKilof/doinst.sh @@ -0,0 +1,13 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -x /usr/bin/update-mime-database ]; then + /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/graphics/FotoKilof/icon.png b/graphics/FotoKilof/icon.png Binary files differnew file mode 100644 index 0000000000000..f413117be0c7d --- /dev/null +++ b/graphics/FotoKilof/icon.png diff --git a/graphics/FotoKilof/move_fotokilof-to-__main__.patch b/graphics/FotoKilof/move_fotokilof-to-__main__.patch new file mode 100644 index 0000000000000..5771767cbddf1 --- /dev/null +++ b/graphics/FotoKilof/move_fotokilof-to-__main__.patch @@ -0,0 +1,94 @@ +This patch solves the issues in the build from source from Slackware +It is extracted from the last changes committed in the current git branch +by the author Team-TL. +Thanks to Team-TL (aka Tomasz Łuczak) + +--- fotokilof/fotokilof.sh 2023-04-26 21:00:46.000000000 +0200 ++++ fotokilof/fotokilof.sh 2023-06-01 19:05:41.388973243 +0200 +@@ -2,5 +2,5 @@ + + # MYPATH - path to FotoKilof python source +-MAIN=fotokilof.py ++MAIN=__main__.py + MYPATH="${0%/*}" + cd $MYPATH + +--- ./fotokilof/__init__.py 2023-04-26 21:00:46.000000000 +0200 ++++ ./fotokilof/__init__.py 2023-06-01 19:04:14.564973735 +0200 +@@ -2,5 +2,5 @@ + + """ +-Copyright (c) 2019-2022 Tomasz Łuczak, TeaM-TL ++Copyright (c) 2019-2023 Tomasz Łuczak, TeaM-TL + + Permission is hereby granted, free of charge, to any person obtaining a copy + +--- ./setup.py 2023-04-26 21:00:46.000000000 +0200 ++++ ./setup.py 2023-06-01 19:01:40.430974610 +0200 +@@ -1,3 +1,3 @@ +-import setuptools ++from setuptools import setup, find_packages + + with open("README.md", "r") as fh: +@@ -7,5 +7,5 @@ + with open("fotokilof/version.py") as fp: + exec(fp.read(), pkg_vars) +-setuptools.setup( ++setup( + name=pkg_vars['__appname__'], + version=pkg_vars['__version__'], +@@ -17,5 +17,4 @@ + long_description=long_description, + long_description_content_type="text/markdown", +- packages=setuptools.find_packages(), + license="MIT", + classifiers=[ +@@ -26,11 +25,12 @@ + ], + python_requires='>=3.6', +- install_requires=['pillow','wand','ttkbootstrap'], +- entry_points = { +- "gui_scripts": [ +- "fotokilof = fotokilof:__main__", +- ] +- }, + include_package_data=True, ++ packages=find_packages(), ++ install_requires=['pillow','wand','ttkbootstrap'], ++# entry_points = { ++# "gui_scripts": [ ++# "fotokilof = fotokilof:__main__", ++# ] ++# }, + ) + +--- ./scripts/0_pypi_setuptools.sh 2023-04-26 21:00:46.000000000 +0200 ++++ ./scripts/0_pypi_setuptools.sh 2023-06-01 19:07:20.691972680 +0200 +@@ -4,13 +4,8 @@ + rm -rf ../fotokilof/__pycache__ + CWD=`pwd` +-INITPY="fotokilof/__init__.py" +-MAINPY="fotokilof/fotokilof.py" +-MAIN__PY="fotokilof/__main__.py" + + echo "- PyPI ---" + + cd .. +-touch $INITPY +-mv $MAINPY $MAIN__PY + + # Python 3.8 +@@ -19,5 +14,4 @@ + python3 setup.py sdist bdist_wheel + +-mv $MAIN__PY $MAINPY + cd $CWD + +--- ./MANIFEST.in 2023-04-26 21:00:46.000000000 +0200 ++++ ./MANIFEST.in 2023-06-01 19:00:41.446974944 +0200 +@@ -11,4 +11,4 @@ + + # Include locale +-recursive-include fotokilof/locale * ++recursive-include locale *.mo + diff --git a/graphics/FotoKilof/slack-desc b/graphics/FotoKilof/slack-desc new file mode 100644 index 0000000000000..da6f0e503ada2 --- /dev/null +++ b/graphics/FotoKilof/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +FotoKilof: FotoKilof (graphic interface for ImageMagick functionality) +FotoKilof: +FotoKilof: FotoKilof is a Graphical interface written in Python which +FotoKilof: allows you to process pictures with ImageMagick as alternative to +FotoKilof: command line. +FotoKilof: It supports most ImageMagick functionality giving at the same time a +FotoKilof: comfortable graphical user interface. +FotoKilof: +FotoKilof: Home page: https://github.com/TeaM-TL/FotoKilof +FotoKilof: +FotoKilof: |