File trimage.spec of Package trimage

# spec file for package trimage
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           trimage
Version:        1.0.6
Release:        0
Summary:        Tool for Losslessly Optimizing PNG and JPEG Files
License:        MIT
Group:          Productivity/Graphics/Other
BuildRequires:  hicolor-icon-theme
BuildRequires:  python3-setuptools
BuildRequires:  update-desktop-files
Requires:       advancecomp
Requires:       jpegoptim
Requires:       optipng
Requires:       pngcrush
Requires:       python3-qt5
BuildArch:      noarch

Trimage is a cross-platform GUI and command-line interface to optimize
image files via optipng, pngcrush, advpng and jpegoptim, depending on
the filetype (currently, PNG and JPEG files are supported). It was
inspired by imageoptim. All image files are losslessy compressed on
the highest available compression levels. Trimage gives you various
input functions to fit your own workflow: a regular file dialog,
dragging and dropping and various command line options.

%setup -q -n Trimage-%{version}
# Fix wrong end-of-line encoding.
sed -i 's/.$//' \

# Remove shebang.
sed -i '1,2d' \
    trimage/*.py \


python3 install \
    --root=%{buildroot} \
%suse_update_desktop_file -N Trimage -G "Image Compressor" %{name} Graphics RasterGraphics

%license COPYING