File fotoxx.spec of Package fotoxx

# vim: set ts=4 sw=4 et:
#
# spec file for package fotoxx
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
# Copyright (c) 2022 Marcin Bajor <marcin.bajor@gmail.com>
#
# 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 https://bugs.opensuse.org/
#


Name:           fotoxx
Version:        22.20
Release:        0
Summary:        Program for improving image files made with a digital camera
License:        GPL-3.0-only
Group:          Productivity/Graphics/Other
URL:            http://www.kornelix.com/fotoxx/fotoxx.html
Source0:        http://www.kornelix.com/downloads/tarballs/fotoxx-%{version}.tar.gz
Source1:        fotoxx-maps-1.7.tar.gz
# fotoxx.appdata.xml is missing in 21.60 - readded it as source file
Source2:        fotoxx.appdata.xml
Source99:       %{name}.rpmlintrc
BuildRequires:  clutter-devel
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  gtk3-devel
BuildRequires:  hicolor-icon-theme
BuildRequires:  libchamplain-devel
BuildRequires:  libjpeg-devel
BuildRequires:  liblcms2-devel
BuildRequires:  libpng-devel
BuildRequires:  libraw-devel
BuildRequires:  libtiff-devel
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  xdg-utils
Requires:       %{_bindir}/dcraw
Requires:       %{_bindir}/exiftool
Requires:       %{_bindir}/ufraw
Requires:       %{_bindir}/xdg-open
Requires:       perl(Image::ExifTool)
Conflicts:      fotoxx-doc
Provides:       fotox = %{version}-%{release}
Obsoletes:      fotox < %{version}

%description
Fotoxx is a free open-source Linux program for improving image files made with
a digital camera.
The following functions are provided:
* Show thumbnails of image files in a directory, navigate, choose files to
  view or edit.
* Adjust overexposed or underexposed areas to improve visibility of detail
  (change brightness independently for different brightness levels).
* Reduce fog or haze by removing "whiteness" and intensifying colors.
* High dynamic range (HDR) photography: combine an underexposed and
  overexposed image to improve details visible in both bright and dark
  areas. Automatic image alignment.
* Photo stitching or panorama: stitch two or more images together to make an
  ultra-wide image.
* Simple image alignment and brightness / color matching.
* Crop an image (choose the area of interest and cut-off the margins).
* Rotate an image by any angle (level a tilted image, or turn in 90 degree
  steps).
* Resize an image, with convenience buttons for 2/3, 1/2, 1/3 and 1/4 size.
* Red-eye removal.

%package maps
Version:        1.7
Summary:        Provides map files for use with Fotoxx
Requires:       %{name} = 22.20

%description maps
Fotoxx-maps provides map files for use with Fotoxx.
When used with Fotoxx, these maps show the locations of photos that
have geotags in their embedded EXIF data. A map location may be
selected with the mouse and the corresponding photes will be shown
as a scrollable page of thumbnails. These may be selected in turn
for viewing at full size or editing with Fotoxx.

%prep
%setup -q -n %{name}
%setup -q -a 1 -n %{name}

cp -f %{SOURCE2} fotoxx.appdata.xml

find doc/ -executable -type f -exec chmod 0644 {} \;
find data/ -executable -type f -exec chmod 0644 {} \;
find . -name '*~' -delete

%build
%make_build \
        PREFIX="%{_prefix}" \
        MANDIR="%{_mandir}/man1" \
        DOCDIR="%{_docdir}/%{name}" \
        CXXFLAGS="%{optflags}" \
        MENUFILE="%{_datadir}/applications/%{name}.desktop"

%install
%make_install \
        PREFIX="%{_prefix}" \
        MANDIR="%{_mandir}/man1" \
        DOCDIR="%{_docdir}/%{name}" \
        MENUFILE="%{_datadir}/applications/%{name}.desktop" \
        LOCALESDIR="%{_datadir}/%{name}/locales" \
        SHAREDIR="%{_datadir}/%{name}"

install -Dpm 0644 fotoxx.appdata.xml \
  %{buildroot}%{_datadir}/metainfo/fotoxx.appdata.xml

%fdupes -s "%{buildroot}%{_datadir}/%{name}"

cd fotoxx-maps
%make_install \
        PREFIX="%{_prefix}" \
        MANDIR="%{_mandir}/man1" \
        DOCDIR="%{_docdir}/fotoxx-maps" \
        SHAREDIR="%{_datadir}/fotoxx-maps"

%files
%{_bindir}/%{name}
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%{_datadir}/%{name}/icons/%{name}.png
%{_datadir}/metainfo/fotoxx.appdata.xml
%{_datadir}/applications/%{name}.desktop
%{_mandir}/man1/%{name}.1%{?ext_man}
%dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/*

%files maps
%{_bindir}/fotoxx-maps
%dir %{_docdir}/fotoxx-maps
%doc %{_docdir}/fotoxx-maps/*
%dir %{_datadir}/fotoxx-maps
%{_datadir}/fotoxx-maps/*
%{_datadir}/applications/fotoxx-maps.desktop
%{_mandir}/man1/fotoxx-maps.1%{?ext_man}

%changelog
openSUSE Build Service is sponsored by