SUNWTiff.spec
author an230044
Mon, 27 Sep 2010 11:32:21 +0000
branchopensolaris-2009-06
changeset 20102 2d19c462bb98
parent 20095 1390a2f94262
permissions -rw-r--r--
6917569 CVE-2008-5824 libaudiofile contains heap-based buffer overflow in msadpcm.c Committing for Rohini because of svn issues on opensolaris2009.06 branch.

#
# spec file for package SUNWTiff
#
# includes module(s): tiff
#
# Copyright 2007 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Owner: laca
#
%include Solaris.inc

%define _prefix /usr

%define tarball_version 3.9.4 

Name:                    SUNWTiff
Summary:                 libtiff - library for reading and writing TIFF
Version:                 20.%{default_pkg_version}
Source:                  ftp://ftp.remotesensing.org/pub/libtiff/tiff-%{tarball_version}.tar.gz
Source1:                 %{name}-manpages-0.1.tar.gz
SUNW_BaseDir:            %{_prefix}
SUNW_Copyright:          %{name}.copyright
BuildRoot:               %{_tmppath}/%{name}-%{version}-build

%include default-depend.inc
Requires: SUNWlibms
Requires: SUNWzlib

%package devel
Summary:                 %{summary} - development files
SUNW_BaseDir:            %{_prefix}
%include default-depend.inc
Requires: SUNWTiff
Requires: SUNWman

%prep
%setup -c -n %name-%version
cd tiff-%{tarball_version}
gzcat %SOURCE1 | tar -xf -

%ifarch amd64 sparcv9
cd ..
cp -pr tiff-%{tarball_version} tiff-%{tarball_version}-64
%endif

%build
CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
if test "x$CPUS" = "x" -o $CPUS = 0; then
    CPUS=1
fi
export CFLAGS="$RPM_OPT_FLAGS"
export LDFLAGS="%_ldflags"

cd tiff-%{tarball_version}

%ifarch sparc
%define target sparc-sun-solaris
%else
%define target i386-sun-solaris
%endif

./configure \
	--prefix=%{_prefix} \
	--libexecdir=%{_libexecdir} \
	--disable-cxx
make -j$CPUS

%ifarch amd64 sparcv9
cd ../tiff-%{tarball_version}-64
export CFLAGS="%optflags64"
./configure \
	--prefix=%{_prefix} \
	--libexecdir=%{_libexecdir}/%{_arch64} \
	--libdir=%{_libdir}/%{_arch64} \
	--disable-cxx
make -j$CPUS
%endif

%install
%ifarch amd64 sparcv9
cd tiff-%{tarball_version}-64
make install DESTDIR=$RPM_BUILD_ROOT
if test -d sun-manpages; then
	cd sun-manpages
	make install DESTDIR=$RPM_BUILD_ROOT
	cd ..
fi
rm -f $RPM_BUILD_ROOT%{_libdir}/%{_arch64}/lib*a
cd ..
%endif

cd tiff-%{tarball_version}
make install DESTDIR=$RPM_BUILD_ROOT
if test -d sun-manpages; then
	cd sun-manpages
	make install DESTDIR=$RPM_BUILD_ROOT
	cd ..
fi

mkdir -p $RPM_BUILD_ROOT%{_mandir}/entities
touch $RPM_BUILD_ROOT%{_mandir}/entities/booktitles.ent
touch $RPM_BUILD_ROOT%{_mandir}/entities/gnomecommon.ent
touch $RPM_BUILD_ROOT%{_mandir}/entities/smancommon.ent
cd $RPM_BUILD_ROOT%{_mandir}/man3tiff
ln -s ../entities/booktitles.ent .
ln -s ../entities/gnomecommon.ent .
ln -s ../entities/smancommon.ent .
rm $RPM_BUILD_ROOT%{_mandir}/entities/booktitles.ent
rm $RPM_BUILD_ROOT%{_mandir}/entities/gnomecommon.ent
rm $RPM_BUILD_ROOT%{_mandir}/entities/smancommon.ent
rmdir $RPM_BUILD_ROOT%{_mandir}/entities
cd -
chmod 0755 $RPM_BUILD_ROOT%{_mandir}/man3tiff
chmod 0755 $RPM_BUILD_ROOT%{_mandir}/man1
chmod 0755 $RPM_BUILD_ROOT%{_mandir}/man3
chmod 0755 $RPM_BUILD_ROOT%{_libdir}/libtiff.so.3

rm -f $RPM_BUILD_ROOT%{_libdir}/lib*a
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc
rm -rf $RPM_BUILD_ROOT%{_prefix}/man

%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_libdir}
%{_libdir}/lib*.so*
%ifarch amd64 sparcv9
%dir %attr (0755, root, bin) %{_libdir}/%{_arch64}
%attr (0755, root, bin) %{_libdir}/%{_arch64}/lib*.so*
%endif
%dir %attr (0755, root, bin) %{_bindir}
%{_bindir}/*
%dir %attr(0755, root, sys) %{_datadir}
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/man1
%{_mandir}/man1/*

%files devel
%defattr (-, root, bin)
%dir %attr (0755, root, bin) %{_includedir}
%{_includedir}/*
%dir %attr(0755, root, sys) %{_datadir}
%dir %attr(0755, root, bin) %{_mandir}
%dir %attr(0755, root, bin) %{_mandir}/man3
%{_mandir}/man3/*
%dir %attr(0755, root, bin) %{_mandir}/man3tiff
%{_mandir}/man3tiff/*

%changelog
* Wed Sep 15 2010 - [email protected]
- Upgraded libtiff to 3.9.4 to fix security vulnerabilities (see CR#6970794).
  Removed upstreamed patches libtiff-01-ormandy.diff, libtiff-02-CVE-2006-2193.diff, libtiff-03-CVE-2008-2327.diff 
  libtiff-04-CVE-2009-2347.diff and libtiff-05-CVE-2009-2285.diff 
* Mon Aug 31 2009 - [email protected]
- add patch libtiff-05-CVE-2009-2285.diff 
* Thu Aug 21 2009 - [email protected]
- add patch libtiff-04-CVE-2009-2347.diff
* Thu Sep  4 2008 - [email protected]
- add patch CVE-2008-2327.diff
* Mon Mar 24 2008 - [email protected]
- add copyright file
* Thu Apr 26 2007 - [email protected]
- add SUNWman dependency, fixes 6511213
* Wed Mar 15 2007 - [email protected]
- Removed adding ccdir to PATH
* Wed Nov 22 2006 - [email protected]
- add patches ormandy.diff and CVE-2006-2193.diff, fixes 6451119
* Fri Sep 01 2006 - [email protected]
- Add new man page tarball
* Fri Jul 28 2006 - [email protected]
- bump to 3.8.2
* Tue May 09 2006 - [email protected]
- merge -share pkg(s) into the base pkg(s)
* Thu Apr 06 2006 - [email protected]
- Now use tarball_version.
* Fri Feb 17 2006 - [email protected]
- Update Build/Requires after running check-deps.pl script.
* Mon Dec 19 2005 - [email protected]
- Bump to 3.7.4.
* Thu Sep 22 2005 - [email protected]
- make install the 64-bit bits first so the executables in %{_bindir}
  get overwritten by the 32-bit ones and not the other way around.
* Fri Sep 02 2005 - [email protected]
- remove unpackaged files
* Tue Apr 26 2004 - [email protected]
- updated to version 3.7.2, fixes CR6203747
* Fri Oct 29 2004 - [email protected]
- use $CC64 as the 64-bit C compiler, if defined
* Sat Oct 02 2004 - [email protected]
- added %pkgbuild_postprocess
* Sat Oct  2 2004 - [email protected]
- Create 64bit libraries for Solaris
* Sun Sep 12 2004 - [email protected]
- Added %defattr for devel-share pkg
* Fri Sep 10 2004 - [email protected]
- Added Requires: SUNWTiff for devel and devel-share packages
* Mon Aug 30 2004 - [email protected]
- Bug 5091588 : include files and sman3 files should be in a separate devel
  package
* Wed Aug 18 2004 - [email protected]
- Update libtiff.so.3 perms for Solaris integration.
* Tue Aug 17 2004 - [email protected]
- Another Update mandir perms for Solaris integration.
* Tue Aug 17 2004 - [email protected]
- Update mandir perms for Solaris integration.
* Tue Aug 17 2004 - [email protected]
- update mandir permissions for Solaris integration
* Fri Aug 13 2004 - [email protected]
- Create symlinks to *.ent in ../entities. Fixes 5085622.
* Thu Aug 12 2004 - [email protected]
- Updated Version to be 2.6.0 since delivering w/ G2.6
* Thu Aug 12 2004 - [email protected]
- Add symlinks to ../entities/*.ent in the sman3tiff dir. Fixes 5085622.
* Sun Feb 23 2004 - [email protected]
- initial version added to CVS