-# NOTE: try to switch to ac/am/lt build on 1.2.x->1.4.x upgrade
Summary: PNG library
Summary(de.UTF-8): PNG-Library
Summary(es.UTF-8): Biblioteca PNG
Summary(pt_BR.UTF-8): Biblioteca PNG
Summary(tr.UTF-8): PNG kitaplığı
Name: libpng
-Version: 1.2.31
-Release: 1
+Version: 1.2.42
+Release: 2
Epoch: 2
License: distributable
Group: Libraries
-Source0: http://dl.sourceforge.net/libpng/%{name}-%{version}.tar.lzma
-# Source0-md5: d1f5fe979e3450cda4d571cef93c507e
+Source0: http://downloads.sourceforge.net/libpng/%{name}-%{version}.tar.xz
+# Source0-md5: dcf4892946e2d6aab6e46d02ed774315
Patch0: %{name}-pngminus.patch
Patch1: %{name}-opt.patch
Patch2: %{name}-norpath.patch
# http://littlesvr.ca/apng/
Patch5: %{name}-apng.patch
URL: http://www.libpng.org/pub/png/libpng.html
-BuildRequires: lzma >= 1:4.42
BuildRequires: rpmbuild(macros) >= 1.213
+BuildRequires: xz >= 1:4.999.7
BuildRequires: zlib-devel
%ifarch %{x8664} ia64 ppc64 s390x sparc64
Provides: libpng.so.3()(64bit)
%prep
%setup -q -c -T
-lzma -dc %{SOURCE0} | tar xf - -C ..
+xzcat -dc %{SOURCE0} | tar xf - -C ..
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch4 -p1
%patch5 -p0
-%ifarch %{ix86}
-ln -sf scripts/makefile.gcmmx ./Makefile
-%else
-ln -sf scripts/makefile.linux ./Makefile
-%endif
-
%build
-%{__make} \
- prefix=%{_prefix} \
- LIBPATH=%{_libdir} \
- CC="%{__cc}" \
-%ifarch %{x8664} sparc sparcv9 sparc64
- OPT_FLAGS="%{rpmcflags} -DPNG_NO_MMX_CODE"
-%else
- OPT_FLAGS="%{rpmcflags}"
-%endif
+%configure
+%{__make}
%{__make} -C contrib/pngminus -f makefile.std \
LIBPATH=%{_libdir} \
$RPM_BUILD_ROOT{%{_pkgconfigdir},%{_examplesdir}/%{name}-%{version}}
%{__make} install \
- DESTDIR=$RPM_BUILD_ROOT \
- prefix=%{_prefix} \
- LIBPATH=%{_libdir} \
- MANPATH=%{_mandir}
+ DESTDIR=$RPM_BUILD_ROOT
+ln -s libpng12 $RPM_BUILD_ROOT%{_includedir}/libpng
install contrib/pngminus/{png2pnm,pnm2png} $RPM_BUILD_ROOT%{_bindir}
install example.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}