LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File feh.spec of Package feh (Project X11:Utilities)

#
# spec file for package feh
#
# Copyright (c) 2016 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 http://bugs.opensuse.org/
#


Name:           feh
Version:        2.17.1
Release:        0
Summary:        Fast and Lightweight Image Viewer
License:        MIT and LGPL-2.0+
Group:          Productivity/Graphics/Viewers
Url:            http://feh.finalrewind.org/
Source:         http://feh.finalrewind.org/feh-%{version}.tar.bz2
Source1:        http://feh.finalrewind.org/%{name}-%{version}.tar.bz2.asc
Source2:        %{name}.keyring
Source3:        jpegexiforient.c
# PATCH-FIX-OPENSUSE feh-makefile_optflags.patch https://github.com/derf/feh/issues/71 pascal.bleser@opensuse.org -- pass OPTFLAGS to make instead of hard-coded -O2 -g
Patch1:         feh-makefile_optflags.patch
# PATCH-FIX-UPSTREAM feh-fix_pointer_arithmetics.patch https://github.com/derf/feh/issues/69 pascal.bleser@opensuse.org -- fix compiler warnings on casting pointers as ints
Patch2:         feh-fix_pointer_arithmetics.patch
# PATCH-FIX-UPSTREAM feh-fix_sighandler.patch https://github.com/derf/feh/issues/70 toganm@opensuse.org -- bad prototype for a sighandler_t and a funky unportable pointer cast
Patch5:         feh-2.12-fix_sighandler.patch
# PATCH-FIX-UPSTREAM feh-makefile_app.patch mimi.vx@gmail.com -- fix ICON_PATH
Patch6:         feh-makefile_app.patch
BuildRequires:  curl-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  pkgconfig
BuildRequires:  xorg-x11-devel
BuildRequires:  pkgconfig(freetype2)
BuildRequires:  pkgconfig(imlib2)
BuildRequires:  pkgconfig(libexif)
Requires:       imlib2-loaders
Requires(post): desktop-file-utils
Requires(post): hicolor-icon-theme
Requires(postun): desktop-file-utils
Requires(postun): hicolor-icon-theme
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
feh is a versatile and fast image viewer using imlib2, the
premier image file handling library. feh has many features,
from simple single file viewing, to multiple file modes using
a slideshow or multiple windows. feh supports the creation of
montages as index prints with many user-configurable options.

%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch5 -p1
%patch6 -p1

cp %{SOURCE3} .

%build
make %{?_smp_mflags} \
    curl=1 \
    help=1 \
    xinerama=1 \
    debug=0 \
    exif=1 \
    PREFIX="%{_prefix}" \
    OPTFLAGS="%{optflags} -Wall -Wextra"

gcc %{optflags} jpegexiforient.c -o jpegexiforient

%install
make \
    PREFIX="%{buildroot}%{_prefix}" \
    install cam=1 app=1 examples=0

rm -rf "%{buildroot}%{_datadir}/doc"

install -D -m0755 jpegexiforient %{buildroot}%{_bindir}/jpegexiforient

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr(-, root, root)
%doc AUTHORS ChangeLog README TODO
%{_bindir}/feh
%{_bindir}/feh-cam
%{_bindir}/gen-cam-menu
%{_bindir}/jpegexiforient
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_mandir}/man1/feh.1%{ext_man}
%{_mandir}/man1/feh-cam.1%{ext_man}
%{_mandir}/man1/gen-cam-menu.1%{ext_man}

%changelog