[libpng] Update to new major release series 1.5.x
Tom Lane
tgl at fedoraproject.org
Sat Nov 5 16:48:03 UTC 2011
commit d54238fd6f97129386e6fcc256c6d310704bcb68
Author: Tom Lane <tgl at redhat.com>
Date: Sat Nov 5 12:47:29 2011 -0400
Update to new major release series 1.5.x
.gitignore | 1 +
libpng-multilib.patch | 8 ++--
libpng-pngconf.patch | 42 --------------------------
libpng.spec | 77 ++++++++++++++++++++++++++++++++++++++++--------
sources | 1 +
5 files changed, 70 insertions(+), 59 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 985ee42..3c3e3b6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
+/libpng-1.5.6.tar.bz2
/libpng-1.2.46.tar.bz2
diff --git a/libpng-multilib.patch b/libpng-multilib.patch
index 8b10eb9..c99c765 100644
--- a/libpng-multilib.patch
+++ b/libpng-multilib.patch
@@ -1,10 +1,10 @@
Use pkg-config to report libpng version and installation directories.
-diff -Naur libpng-1.2.31.orig/scripts/libpng-config.in libpng-1.2.31/scripts/libpng-config.in
---- libpng-1.2.31.orig/scripts/libpng-config.in 2008-05-29 13:37:58.000000000 -0400
-+++ libpng-1.2.31/scripts/libpng-config.in 2008-08-23 16:57:20.000000000 -0400
-@@ -8,11 +8,11 @@
+diff -Naur libpng-1.5.5.orig/libpng-config.in libpng-1.5.5/libpng-config.in
+--- libpng-1.5.5.orig/libpng-config.in 2011-09-22 09:40:23.000000000 -0400
++++ libpng-1.5.5/libpng-config.in 2011-10-05 01:03:32.335435187 -0400
+@@ -11,11 +11,11 @@
# Modeled after libxml-config.
diff --git a/libpng.spec b/libpng.spec
index 5887609..585ac1a 100644
--- a/libpng.spec
+++ b/libpng.spec
@@ -1,22 +1,29 @@
Summary: A library of functions for manipulating PNG image format files
Name: libpng
Epoch: 2
-Version: 1.2.46
+Version: 1.5.6
Release: 1%{?dist}
License: zlib
Group: System Environment/Libraries
URL: http://www.libpng.org/pub/png/
+# This SRPM includes a copy of libpng 1.2.x, which is provided as a stopgap
+# measure to satisfy dependencies on libpng.so.3 until all applications can
+# be recompiled. The compatibility library is placed in a separate
+# sub-RPM, libpng-compat. There is no support for recompiling source code
+# against the old version.
+%global prevversion 1.2.46
+
# Note: non-current tarballs get moved to the history/ subdirectory,
# so look there if you fail to retrieve the version you want
-Source: ftp://ftp.simplesystems.org/pub/png/src/libpng-%{version}.tar.bz2
+Source0: ftp://ftp.simplesystems.org/pub/png/src/libpng-%{version}.tar.bz2
+
+Source1: ftp://ftp.simplesystems.org/pub/png/src/libpng-%{prevversion}.tar.bz2
Patch0: libpng-multilib.patch
-Patch1: libpng-pngconf.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: zlib-devel, pkgconfig
-Conflicts: qt < 0:2.2.2
%description
The libpng package contains a library of functions for creating and
@@ -31,7 +38,8 @@ files.
%package devel
Summary: Development tools for programs to manipulate PNG image format files
Group: Development/Libraries
-Requires: libpng = %{epoch}:%{version}-%{release} zlib-devel pkgconfig
+Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release}
+Requires: zlib-devel pkgconfig
%description devel
The libpng-devel package contains header files and documentation necessary
@@ -44,38 +52,68 @@ the libpng package.
%package static
Summary: Static PNG image format file library
Group: Development/Libraries
-Requires: libpng-devel = %{epoch}:%{version}-%{release}
+Requires: %{name}-devel%{?_isa} = %{epoch}:%{version}-%{release}
%description static
The libpng-static package contains the statically linkable version of libpng.
Linking to static libraries is discouraged for most applications, but it is
necessary for some boot packages.
+%package compat
+Summary: Temporary backwards-compatibility copy of old libpng
+Group: Development/Libraries
+
+%description compat
+This package contains shared libraries (only) for libpng 1.2.x.
+
%prep
%setup -q
%patch0 -p1
-%patch1 -p1
+
+tar xfj %{SOURCE1}
%build
%configure
make %{?_smp_mflags}
+# this is for the compat package:
+ pushd libpng-%{prevversion}
+ %configure
+ make %{?_smp_mflags}
+ popd
+
%install
rm -rf $RPM_BUILD_ROOT
-%makeinstall
+
+# install compat package first, then remove unwanted files
+ pushd libpng-%{prevversion}
+ make DESTDIR=$RPM_BUILD_ROOT install
+ rm -rf $RPM_BUILD_ROOT%{_bindir}
+ rm -rf $RPM_BUILD_ROOT%{_includedir}
+ rm -rf $RPM_BUILD_ROOT%{_mandir}
+ rm -f $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libpng.pc
+ rm -f $RPM_BUILD_ROOT%{_libdir}/libpng*.so
+ rm -f $RPM_BUILD_ROOT%{_libdir}/libpng*.a
+ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
+ popd
+
+make DESTDIR=$RPM_BUILD_ROOT install
+
# We don't ship .la files.
-rm -rf $RPM_BUILD_ROOT%{_libdir}/libpng.la
-rm -rf $RPM_BUILD_ROOT%{_libdir}/libpng12.la
+rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
+%post compat -p /sbin/ldconfig
+%postun compat -p /sbin/ldconfig
+
%files
%defattr(-,root,root)
-%doc *.txt example.c README TODO CHANGES LICENSE
-%{_libdir}/libpng*.so.*
+%doc libpng-manual.txt example.c README TODO CHANGES LICENSE
+%{_libdir}/libpng15.so.*
%{_mandir}/man5/*
%files devel
@@ -83,17 +121,30 @@ rm -rf $RPM_BUILD_ROOT%{_libdir}/libpng12.la
%{_bindir}/*
%{_includedir}/*
%{_libdir}/libpng*.so
-%{_libdir}/pkgconfig/*
+%{_libdir}/pkgconfig/libpng.pc
+%{_libdir}/pkgconfig/libpng15.pc
%{_mandir}/man3/*
%files static
%defattr(-,root,root)
%{_libdir}/libpng*.a
+%files compat
+%defattr(-,root,root)
+%{_libdir}/libpng.so.3*
+%{_libdir}/libpng12.so.*
+%{_libdir}/pkgconfig/libpng12.pc
+
%clean
rm -rf $RPM_BUILD_ROOT
%changelog
+* Sat Nov 5 2011 Tom Lane <tgl at redhat.com> 2:1.5.6-1
+- Update to new major release series 1.5.x; includes source-code-incompatible
+ API changes and a soname version bump
+- Temporarily package 1.2.46 shared library (only) in libpng-compat subpackage
+ so that dependent packages won't be broken while rebuilding proceeds
+
* Thu Jul 14 2011 Tom Lane <tgl at redhat.com> 2:1.2.46-1
- Update to libpng 1.2.46, includes fixes for CVE-2011-2501, CVE-2011-2690,
CVE-2011-2691, CVE-2011-2692
diff --git a/sources b/sources
index 8596699..5d38bce 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
+2107095191b0e8bd9a0f4f930c1948c3 libpng-1.5.6.tar.bz2
e8b43dc78ef95b3949af7f961d76874b libpng-1.2.46.tar.bz2
More information about the scm-commits
mailing list