libpng16/libpng16.spec

167 lines
5.0 KiB
RPMSpec
Raw Normal View History

#
# spec file for package libpng16
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
#
%define major 1
%define minor 6
%define micro 16
%define branch %{major}%{minor}
%define libname libpng%{branch}-%{branch}
Name: libpng16
Url: http://www.libpng.org/pub/png/libpng.html
Version: %{major}.%{minor}.%{micro}
Release: 0
Summary: Library for the Portable Network Graphics Format (PNG)
License: Zlib
Group: System/Libraries
Source0: ftp://ftp.simplesystems.org/pub/png/src/libpng16/libpng-%{version}.tar.xz
- updated to 1.6.9: Bookkeeping: Moved functions around (no changes). Moved transform function definitions before the place where they are called so that they can be masde static. Move the intrapixel functions and the grayscale palette builder out of the png?tran.c files. The latter isn't a transform function and is no longer used internally, and the former MNG specific functions are better placed in pngread/pngwrite.c Made transform implementation functions static. This makes the internal functions called by png_do_{read|write}_transformations static. On an x86-64 DLL build (Gentoo Linux) this reduces the size of the text segment of the DLL by 1208 bytes, about 0.6%. It also simplifies maintenance by removing the declarations from pngpriv.h and allowing easier changes to the internal interfaces. Rebuilt configure scripts with automake-1.14.1 and autoconf-2.69 in the tar distributions. Added checks for libpng 1.5 to pngvalid.c. This supports the use of this version of pngvalid in libpng 1.5 Merged with pngvalid.c from libpng-1.7 changes to create a single pngvalid.c Merged pngrio.c, pngtrans.c, pngwio.c, and pngerror.c with libpng-1.7.0 Merged libpng-1.7.0 changes to make no-interlace configurations work with test programs. Revised pngvalid.c to support libpng 1.5, which does not support the PNG_MAXIMUM_INFLATE_WINDOW option, so #define it out when appropriate in pngvalid.c Allow unversioned links created on install to be disabled in configure. In configure builds 'make install' changes/adds links like png.h and libpng.a to point to the newly installed, versioned, files (e.g. libpng17/png.h and libpng17.a). Three new configure options and some rearrangement of Makefile.am allow creation of these links to be OBS-URL: https://build.opensuse.org/package/show/graphics/libpng16?expand=0&rev=51
2014-02-07 08:38:42 +01:00
Source1: ftp://ftp.simplesystems.org/pub/png/src/libpng16/libpng-%{version}.tar.xz.asc
Source2: libpng16.keyring
Source3: rpm-macros.libpng-tools
Source4: baselibs.conf
#BuildRequires: gpg-offline
BuildRequires: libtool
BuildRequires: pkg-config
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define debug_package_requires %{libname} = %{version}-%{release}
%package -n %{libname}
Summary: Library for the Portable Network Graphics Format (PNG)
Group: System/Libraries
# bug437293
%ifarch ppc64
Obsoletes: libpng-64bit
%endif
#
Obsoletes: libpng < %{version}
Provides: libpng = %{version}-%{release}
%package devel
Summary: Development Tools for applications which will use the Libpng
Group: Development/Libraries/C and C++
Requires: %{libname} = %{version}
Requires: glibc-devel
Requires: pkg-config
Requires: zlib-devel
Recommends: libpng%{branch}-compat-devel
# bug437293
%ifarch ppc64
Obsoletes: libpng-devel-64bit
%endif
#
%package compat-devel
Summary: Development Tools for applications which will use the Libpng
Group: Development/Libraries/C and C++
Requires: libpng%{branch}-devel = %{version}
Provides: libpng-devel = %{version}
Obsoletes: libpng-devel < 1.2.44
Conflicts: otherproviders(libpng-devel)
%package tools
Summary: Tools for Manipulating PNG Images
Group: Productivity/Graphics/Other
Provides: libpng-tools = %{version}
Conflicts: otherproviders(libpng-tools)
%description
libpng is the official reference library for the Portable Network
Graphics format (PNG).
%description -n %{libname}
libpng is the official reference library for the Portable Network
Graphics format (PNG).
%description devel
The libpng%{branch}-devel package includes the header files, libraries,
configuration files and development tools necessary for compiling and
linking programs which will manipulate PNG files using libpng%{branch}.
libpng is the official reference library for the Portable Network
Graphics (PNG) format.
%description compat-devel
The libpng%{branch}-compat-devel package contains unversioned symlinks
to the header files, libraries, configuration files and development
tools necessary for compiling and linking programs that don't care
about libpng version.
%description tools
Package consists of low level tools for manipulating and fixing particular
PNG files.
%prep
%setup -n libpng-%{version}
%build
# PNG_SAFE_LIMITS_SUPPORTED: http://www.openwall.com/lists/oss-security/2015/01/10/1
export CFLAGS="%optflags -O3 -DPNG_SAFE_LIMITS_SUPPORTED -DPNG_SKIP_SETJMP_CHECK $(getconf LFS_CFLAGS)"
export LDFLAGS="-Wl,-z,relro,-z,now"
%configure \
--disable-static \
--with-libpng-compat=no
make %{?_smp_mflags}
%check
make check
%install
make install DESTDIR=$RPM_BUILD_ROOT
rm $RPM_BUILD_ROOT/%{_libdir}/libpng*.la
mkdir -p %{buildroot}%{_sysconfdir}/rpm
cp -a %{SOURCE3} \
%{buildroot}%{_sysconfdir}/rpm/macros.libpng-tools
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/libpng%{branch}.so.*
%files devel
%defattr(-,root,root)
%{_bindir}/libpng%{branch}-config
%{_includedir}/libpng%{branch}
%{_libdir}/libpng%{branch}.so
%{_libdir}/pkgconfig/libpng%{branch}.pc
%doc CHANGES README TODO ANNOUNCE LICENSE libpng-*.txt
%files compat-devel
%defattr(-,root,root)
%{_bindir}/libpng-config
%{_includedir}/*.h
%{_libdir}/libpng.so
%{_libdir}/pkgconfig/libpng.pc
%doc %{_mandir}/man3/libpng.3.gz
%doc %{_mandir}/man3/libpngpf.3.gz
%doc %{_mandir}/man5/png.5.gz
%files tools
%defattr(-,root,root)
%{_bindir}/png-fix-itxt
%{_bindir}/pngfix
%{_sysconfdir}/rpm/macros.libpng-tools
%changelog