File xv.spec of Package xv
#
# spec file for package xv
#
# 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/
#
# norootforbuild
Name: xv
BuildRequires: dos2unix
BuildRequires: groff
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: update-desktop-files
BuildRequires: xorg-x11-devel
BuildRequires: zlib-devel
Url: http://www.trilon.com/xv/
License: SUSE-NonFree
Group: Productivity/Graphics/Viewers
Provides: xv300
AutoReqProv: on
Version: 3.10a
Release: 1278
Summary: GIF/TIFF/JPEG/PostScript Image Viewer
Source: xv-3.10a.tar.bz2
#Url http://www.gregroelofs.com/greg_xv.html
Source1: xv-3.10a-jumbo-patches-20070520.tar.bz2
Source2: xsetbgimg
Source3: xv.desktop
Source4: xv.png
Source5: xv-tests.tar.bz2
Patch: xv-3.10a.dif
Patch1: xv-3.10a-ticks.dif
Patch2: xv-3.10a-signal.dif
Patch3: xv-3.10a-overflow.dif
Patch4: xv-3.10a-jpeg8.dif
Patch5: xv-3.10a-png.dif
Patch6: xv-3.10a-xwd.dif
Patch7: xv-3.10a-dirw.dif
Patch8: xv-3.10a-enhancements.20070520-20081216.diff
Patch9: xv-3.10a-libpng15.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{expand: %%global _exec_prefix %(type -p pkg-config &>/dev/null && pkg-config --variable prefix x11 || echo /usr/X11R6)}
%if "%_exec_prefix" == "/usr/X11R6"
%global _mandir %{_exec_prefix}/man
%define _x11data %{_exec_prefix}/lib/X11
%define _libx11 %{_x11data}
%else
%define _x11data %{_datadir}/X11
%define _libx11 %{_exec_prefix}/lib/X11
%endif
%description
XV is an interactive image viewer for the X Window System. XV displays
images in GIF, JPEG, TIFF, PNG, PBM, PGM, PPM, X Window System bitmap,
Utah Raster Toolkit RLE, PDS/VICAR, Sun Rasterfile, BMP, PCX, IRIS RGB,
XPM, Targa, XWD, possibly PostScript, and PM formats on workstations
and terminals running the X Window System Version 11.
XV can also manipulate pictures. It can zoom in and out, rotate, and
flip them. It also provides a wide variety of operations to modify
colors.
It is one of the most famous programs for Linux.
The documentation can be found in /usr/share/doc/packages/xv/.
Please remember that this program has shareware status for commercial
use.
Authors:
--------
John Bradley <xv@trilon.com>
%prep
%setup -q -b1
patch -p1 -s --suffix=.jumbo-20070520 < ../xv-3.10a-jumbo-fix-enh-patch-20070520.txt
%patch8 -p0 -b .jumbo-20081216
%patch1 -p0 -b .ticks
%patch2 -p0 -b .sig
%patch3 -p0 -b .ovf
%patch4 -p0 -b .jpg8
%patch5 -p0 -b .png
%patch6 -p0 -b .xwd
%patch7 -p0 -b .dirw
%patch9 -p0 -b .libpng5
%patch
%build
# Do not overwrite CFLAGS here
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector"
xmkmf -a
make
%install
rm -rf %{buildroot}
mkdir %{buildroot}
mv docs/README docs/README.docs
make install DESTDIR=%{buildroot}
make install.man DESTDIR=%{buildroot}
rm docs/*._man
mkdir man
for m in docs/*.man; do
test -e $m || continue
troff -Tlatin1 -t -mandoc < $m | grotty -bou > ${m%.*}.txt
mv $m man/
done
ln -sf README COPYRIGHT
if test -e docs/xvdocs.pdf ; then
rm -vf docs/xvdocs.ps
fi
if test -e docs/xvtitle.ps ; then
cp -p docs/xvtitle.ps tmp.ps
dos2unix docs/xvtitle.ps
touch -r tmp.ps docs/xvtitle.ps
fi
install -m 755 %{S:2} %{buildroot}%{_bindir}/xsetbgimg
rm -f %{buildroot}%{_libx11}/xv_mgcsfx.sample
%suse_update_desktop_file -i xv Graphics Viewer
%files
%defattr(-,root,root)
%doc README.jumbo README.pcd README
%doc COPYRIGHT docs/*
%{_datadir}/applications/xv.desktop
%{_datadir}/pixmaps/xv.png
%{_bindir}/bggen
%{_bindir}/vdcomp
%{_bindir}/xcmap
%{_bindir}/xsetbgimg
%{_bindir}/xv
%{_bindir}/xvpictoppm
%doc %{_mandir}/man1/bggen.1x.gz
%doc %{_mandir}/man1/vdcomp.1x.gz
%doc %{_mandir}/man1/xcmap.1x.gz
%doc %{_mandir}/man1/xv.1x.gz
%doc %{_mandir}/man1/xvpictoppm.1x.gz
%changelog