LogoopenSUSE Build Service > Projects
Sign Up | Log In

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

#
# spec file for package xzgv
#
# 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/
#


Name:           xzgv
BuildRequires:  gtk2-devel
BuildRequires:  libexif-devel
BuildRequires:  update-desktop-files
%if 0%{suse_version} > 1220
BuildRequires:  makeinfo
%endif
Url:            http://sourceforge.net/projects/xzgv
Version:        0.9.1
Release:        0
Summary:        A Fast Picture Viewer for the X Window System
License:        GPL-2.0+
Group:          Productivity/Graphics/Viewers
Source:         %{name}-%{version}.tar.bz2
Source1:        %name.desktop
PreReq:         %install_info_prereq
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Patch:          xzgv-0.9.1-as-needed.patch
Patch1:         xzgv-0.9.1-exif-orient.patch
Patch2:         xzgv-0.9.1-iconify.patch

%description
Xzgv is a picture viewer for the X Window System with a thumbnail-based
file selector. It uses GTK+ and Imlib. Most file formats are supported,
and the thumbnails used are compatible with xv, zgv, and the Gimp. It
can also be used with `xzgv file(s)', to effectively bypass the file
selector. For more on how xzgv works and how to use it, do `info xzgv'
or `man xzgv' once it is installed.

%prep
%setup -q
%patch
%patch1
%patch2

%build
sed -e "s/^CFLAGS=.*/CFLAGS=$RPM_OPT_FLAGS/;" < config.mk > config.mk.tmp
mv config.mk.tmp config.mk
make PREFIX=/usr
# Make all doesn't build the info, but we need it for make install
# (fail the build when this is fixed)
test ! -f doc/xzgv.info.gz
make info PREFIX=/usr

%install
rm -rf $RPM_BUILD_ROOT
make PREFIX=$RPM_BUILD_ROOT/usr install
%suse_update_desktop_file -i %name Graphics Viewer
# Fix permission (fail the build when this is fixed)
test -x %{buildroot}%{_mandir}/man1/xzgv.1
chmod a-x %{buildroot}%{_mandir}/man1/xzgv.1

%post
%install_info --info-dir=%{_infodir} %{_infodir}/xzgv.info.gz

%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/xzgv.info.gz

%files
%defattr(-,root,root)
%doc README AUTHORS COPYING NEWS TODO
%{_bindir}/xzgv
%{_datadir}/applications/xzgv.desktop
%doc %{_mandir}/man1/xzgv.1.gz
%doc %{_infodir}/xzgv.info.gz

%changelog