LogoopenSUSE Build Service > Projects
Sign Up | Log In

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

# vim: set sw=4 ts=4 et:
# Copyright (c) 2012 SUSE LINUX Products 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/

Summary:        Fast and Lightweight Image Viewer
License:        MIT, LGPL-2.0+
Group:          Productivity/Graphics/Viewers
Name:           feh
Version:        2.9.1
Release:        0
Source:         https://derf.homelinux.org/projects/feh/feh-%{version}.tar.bz2
Source1:        %{name}.desktop
Source2:        %{name}.png
# 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-OPENSUSE feh-no_date.patch - pascal.bleser@opensuse.org -- avoid injecting the current date into the man page, which causes needless rebuilds
Patch4:         feh-no_date.patch
# PATCH-FIX-UPSTREAM feh-fix_sighandler.patch https://github.com/derf/feh/issues/70 pascal.bleser@opensuse.org -- bad prototype for a sighandler_t and a funky unportable pointer cast
Patch5:         feh-fix_sighandler.patch
Url:            http://feh.finalrewind.org/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  curl-devel
BuildRequires:  freetype2-devel
BuildRequires:  giblib-devel
BuildRequires:  imlib2-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  xorg-x11-devel
%if 0%{?suse_version}
BuildRequires:  update-desktop-files

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.

%setup -q
%patch1 -p1

%__make %{?_smp_flags} \
    curl=1 \
    xinerama=1 \
    debug=0 \
%if 0%{?suse_version} < 1100
    LDFLAGS="-L%{_prefix}/X11R6/%{_lib}" \
    PREFIX="%{_prefix}" \
    OPTFLAGS="%{optflags} -Wall -Wextra"

%__make \
    PREFIX="%{buildroot}%{_prefix}" \

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

%__install -D -m0644 "%{SOURCE1}" "%{buildroot}/usr/share/applications/feh.desktop"
%__install -D -m0644 "%{SOURCE2}" "%{buildroot}/usr/share/pixmaps/feh.png"

%if 0%{?suse_version}
%suse_update_desktop_file -r feh Graphics Viewer

%{?buildroot:%__rm -rf "%{buildroot}"}

%defattr(-, root, root)
%dir %{_datadir}/%{name}
%doc %{_mandir}/man1/feh.1%{ext_man}
%doc %{_mandir}/man1/feh-cam.1%{ext_man}
%doc %{_mandir}/man1/gen-cam-menu.1%{ext_man}