File tkimg.spec of Package tkimg
#
# spec file for package tkimg
#
# Copyright (c) 2011 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: tkimg
BuildRequires: autoconf
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: tk-devel
BuildRequires: xorg-x11-devel
Url: http://sourceforge.net/projects/tkimg
Summary: More Image Formats for Tk
License: BSD-3-Clause
Group: Development/Libraries/Tcl
Version: 1.3
Release: 0
Source0: %{name}%{version}.tar.bz2
Patch0: %name.patch
Patch1: %name-syslibs.patch
Patch2: %name-makedeps.patch
Patch3: %name-warnings.patch
Patch4: tkimg-CVE-2008-0553.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This package contains a collection of image format handlers for the Tk
photo image type, and a new image type, pixmaps.
The provided format handlers include bmp, gif, ico, jpeg, pcx, png,
ppm, ps, sgi, sun, tga, tiff, xbm, and xpm.
Authors:
--------
Jan Nijtmans <jan.nijtmans@xs4all.nl>
Andreas Kupries <akupries@shaw.ca>
%prep
%setup -q -n %name%{version}
%patch0
%patch1
%patch2
%patch3
%patch4
%build
for f in $(find -type d); do
pushd $f
test -f configure.in && autoconf --force
popd
done
export CFLAGS="$RPM_OPT_FLAGS -fPIC -fno-strict-aliasing "
./configure \
--prefix=%_prefix \
--libdir=%_libdir \
--mandir=%_mandir \
--with-tcl=%_libdir \
--with-tk=%_libdir
make CFLAGS="$CFLAGS"
make test
%install
mkdir -p %buildroot%tclscriptdir
make install DESTDIR=%buildroot INSTALL_ROOT=%buildroot
mv %buildroot%_libdir/Img%version/lib* %buildroot%_libdir
mv %buildroot%_libdir/Img%version %buildroot%tclscriptdir
sed -i 's/\[file join $dir \([^]]*\)\]/\1/' \
%buildroot%tclscriptdir/Img%version/pkgIndex.tcl
mkdir -p %buildroot/%_mandir/mann
pushd doc/man
for f in *.n; do
fgrep -v ".so man.macros" $f > %buildroot/%_mandir/mann/$f
done
popd
%clean
rm -rf %buildroot
%files
%defattr(-,root,root,-)
%doc ANNOUNCE ChangeLog README Reorganization.Notes.txt
%doc changes license.terms doc/html demo
%doc %_mandir/*/*
%tclscriptdir/*
%_libdir/lib*
%_libdir/tkimgConfig.sh
%_includedir/*
%changelog