+++ /dev/null
---- libpng-1.2.2/scripts/makefile.linux.wiget2 Tue Apr 16 15:59:48 2002
-+++ libpng-1.2.2/scripts/makefile.linux Tue Apr 16 16:03:10 2002
-@@ -93,14 +93,14 @@
- chmod 644 $(INCPATH)/$(LIBNAME)/png.h $(INCPATH)/$(LIBNAME)/pngconf.h
- -@/bin/rm -f $(INCPATH)/png.h $(INCPATH)/pngconf.h
- -@/bin/rm -f $(INCPATH)/libpng
-- ln -sf $(INCPATH)/$(LIBNAME) $(INCPATH)/libpng
-+ ln -sf $(LIBNAME) $(INCPATH)/libpng
-
- install-static: install-headers libpng.a
- -@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
- cp libpng.a $(LIBPATH)/$(LIBNAME).a
- chmod 644 $(LIBPATH)/$(LIBNAME).a
- -@/bin/rm -f $(LIBPATH)/libpng.a
-- ln -sf $(LIBPATH)/$(LIBNAME).a $(LIBPATH)/libpng.a
-+ ln -sf $(LIBNAME).a $(LIBPATH)/libpng.a
-
- install-shared: install-headers $(LIBNAME).so.$(PNGVER)
- -@if [ ! -d $(LIBPATH) ]; then mkdir $(LIBPATH); fi
Patch0: %{name}-pngminus.patch
Patch1: %{name}-badchunks.patch
Patch2: %{name}-opt.patch
-Patch3: %{name}-symlinks.patch
BuildRequires: zlib-devel
URL: http://www.libpng.org/pub/png/libpng.html
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%patch0 -p1
%patch1 -p1
%patch2 -p1
-%patch3 -p1
ln -sf scripts/makefile.linux ./Makefile
install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_mandir}/man{3,5},%{_pkgconfigdir}}
%{__make} install \
- prefix=$RPM_BUILD_ROOT%{_prefix}
+ DESTDIR=$RPM_BUILD_ROOT \
+ prefix=%{_prefix} \
+ MANPATH=%{_mandir}
-install png.5 $RPM_BUILD_ROOT%{_mandir}/man5/
-install {libpngpf,libpng}.3 $RPM_BUILD_ROOT%{_mandir}/man3/
install contrib/pngminus/{png2pnm,pnm2png} $RPM_BUILD_ROOT%{_bindir}
-sed -e 's=@PREFIX@=%{_prefix}=g' scripts/libpng.pc.in >$RPM_BUILD_ROOT/%{_pkgconfigdir}/libpng`echo %{version}|sed 's/\([0-9]\+\)\.\([0-9]\+\)\..*/\1\2/'`.pc
+%clean
+rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%files
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/*.so.*.*
%files devel
%defattr(644,root,root,755)
%doc *.txt ANNOUNCE CHANGES KNOWNBUG README
+%attr(755,root,root) %{_bindir}/libpng*-config
%attr(755,root,root) %{_libdir}/lib*.so
%{_pkgconfigdir}/*
%{_includedir}/*
%files progs
%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/*
+%attr(755,root,root) %{_bindir}/p*