X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=libpng.spec;h=b3865218adfe235df53cf629fb03d88833254188;hb=5d7415a0c52016a6635703549d41c7fa78241ef9;hp=b371c96689e4d81762a81cbfa71935fc63a7f387;hpb=589651e61c1f8569cb78ef3d00114ee499b7937c;p=packages%2Flibpng.git diff --git a/libpng.spec b/libpng.spec index b371c96..b386521 100644 --- a/libpng.spec +++ b/libpng.spec @@ -1,4 +1,7 @@ -# NOTE: try to switch to ac/am/lt build on 1.2.x->1.4.x upgrade +# Conditional build: +%bcond_without tests # don't perform "make check" +%bcond_without default_libpng # don't use this libpng as default system libpng +# Summary: PNG library Summary(de.UTF-8): PNG-Library Summary(es.UTF-8): Biblioteca PNG @@ -7,29 +10,22 @@ Summary(pl.UTF-8): Biblioteka PNG Summary(pt_BR.UTF-8): Biblioteca PNG Summary(tr.UTF-8): PNG kitaplığı Name: libpng -Version: 1.2.40 +Version: 1.6.20 Release: 1 Epoch: 2 License: distributable Group: Libraries -Source0: http://dl.sourceforge.net/libpng/%{name}-%{version}.tar.xz -# Source0-md5: 785dc0cb147f293fadcf5ef2fbad7bf7 +Source0: http://downloads.sourceforge.net/libpng/%{name}-%{version}.tar.xz +# Source0-md5: 3968acb7c66ef81a9dab867f35d0eb4b Patch0: %{name}-pngminus.patch -Patch1: %{name}-opt.patch -Patch2: %{name}-norpath.patch -Patch3: %{name}-export_old.patch -Patch4: %{name}-revert.patch -# http://littlesvr.ca/apng/ -Patch5: %{name}-apng.patch +Patch1: http://downloads.sourceforge.net/libpng-apng/%{name}-%{version}-apng.patch.gz +# Patch1-md5: b2186d5e7853890e25b34b03c7f2ddde +Patch2: %{name}-sh.patch URL: http://www.libpng.org/pub/png/libpng.html -BuildRequires: xz >= 1:4.999.7 BuildRequires: rpmbuild(macros) >= 1.213 +BuildRequires: tar >= 1:1.22 +BuildRequires: xz >= 1:4.999.7 BuildRequires: zlib-devel -%ifarch %{x8664} ia64 ppc64 s390x sparc64 -Provides: libpng.so.3()(64bit) -%else -Provides: libpng.so.3 -%endif Provides: libpng(APNG) = 0.10 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -112,22 +108,22 @@ PNG kitaplığını kullanan programlar geliştirmek için gereken kitaplıklar ve başlık dosyaları. %package static -Summary: Static PNG libraries -Summary(de.UTF-8): Statischen PNG Libraries -Summary(pl.UTF-8): Biblioteki statyczne PNG +Summary: Static PNG library +Summary(de.UTF-8): Statisch PNG Library +Summary(pl.UTF-8): Biblioteka statyczna PNG Summary(pt_BR.UTF-8): Bibliotecas estáticas para desenvolvimento com libpng Group: Development/Libraries Requires: %{name}-devel = %{epoch}:%{version}-%{release} Provides: libpng(APNG)-static = 0.10 %description static -Static PNG libraries. +Static PNG library. %description static -l de.UTF-8 -Statischen PNG Libraries. +Statisch PNG Library. %description static -l pl.UTF-8 -Biblioteki statyczne PNG. +Biblioteka statyczna PNG. %description static -l pt_BR.UTF-8 Bibliotecas estáticas para desenvolvimento com libpng. @@ -146,51 +142,40 @@ from PNM files. Narzędzia do konwersji plików PNG z lub do plików PNM. %prep -%setup -q -c -T -lzcat -dc %{SOURCE0} | tar xf - -C .. +%setup -q %patch0 -p1 %patch1 -p1 %patch2 -p1 -%patch3 -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} \ CC="%{__cc}" \ - OPT_FLAGS="%{rpmcflags}" + OPT_FLAGS="%{rpmcppflags} %{rpmcflags}" + +%{?with_tests:%{__make} check} %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_mandir}/man{3,5}} \ - $RPM_BUILD_ROOT{%{_pkgconfigdir},%{_examplesdir}/%{name}-%{version}} +install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} %{__make} install \ - DESTDIR=$RPM_BUILD_ROOT \ - prefix=%{_prefix} \ - LIBPATH=%{_libdir} \ - MANPATH=%{_mandir} + DESTDIR=$RPM_BUILD_ROOT install contrib/pngminus/{png2pnm,pnm2png} $RPM_BUILD_ROOT%{_bindir} install example.c $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} +%if %{without default_libpng} +%{__rm} $RPM_BUILD_ROOT%{_bindir}/{libpng-config,pn?2pn?} \ + $RPM_BUILD_ROOT%{_libdir}/libpng.{so,la,a} \ + $RPM_BUILD_ROOT%{_includedir}/png*.h \ + $RPM_BUILD_ROOT%{_pkgconfigdir}/libpng.pc \ + $RPM_BUILD_ROOT%{_mandir}/man[35]/*png* +%endif + %clean rm -rf $RPM_BUILD_ROOT @@ -199,33 +184,42 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) -%doc ANNOUNCE CHANGES KNOWNBUG README LICENSE -%attr(755,root,root) %{_libdir}/libpng12.so.*.*.* -%attr(755,root,root) %{_libdir}/libpng.so.*.*.* -%attr(755,root,root) %ghost %{_libdir}/libpng12.so.0 -# alternative soname (symlink in PLD, so must be packaged) -%attr(755,root,root) %{_libdir}/libpng.so.3 +%doc ANNOUNCE CHANGES LICENSE README TODO +%attr(755,root,root) %{_libdir}/libpng16.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libpng16.so.16 %files devel %defattr(644,root,root,755) -%doc *.txt -%attr(755,root,root) %{_bindir}/libpng12-config +%doc libpng-manual.txt +%attr(755,root,root) %{_bindir}/libpng16-config +%attr(755,root,root) %{_libdir}/libpng16.so +%{_libdir}/libpng16.la +%{_includedir}/libpng16 +%{_pkgconfigdir}/libpng16.pc +%{_examplesdir}/%{name}-%{version} +%if %{with default_libpng} %attr(755,root,root) %{_bindir}/libpng-config -%attr(755,root,root) %{_libdir}/libpng12.so %attr(755,root,root) %{_libdir}/libpng.so -%{_pkgconfigdir}/libpng12.pc +%{_libdir}/libpng.la %{_pkgconfigdir}/libpng.pc -%{_includedir}/libpng12 -%{_includedir}/libpng %{_includedir}/png*.h -%{_mandir}/man?/* -%{_examplesdir}/%{name}-%{version} +%{_mandir}/man3/libpng.3* +%{_mandir}/man3/libpngpf.3* +%{_mandir}/man5/png.5* +%endif %files static %defattr(644,root,root,755) -%{_libdir}/libpng12.a +%{_libdir}/libpng16.a +%if %{with default_libpng} %{_libdir}/libpng.a +%endif +%if %{with default_libpng} %files progs %defattr(644,root,root,755) -%attr(755,root,root) %{_bindir}/p* +%attr(755,root,root) %{_bindir}/png2pnm +%attr(755,root,root) %{_bindir}/pngfix +%attr(755,root,root) %{_bindir}/png-fix-itxt +%attr(755,root,root) %{_bindir}/pnm2png +%endif