libpng16/libpng16.spec
Petr Gajdos 7d96e07570 - update to 1.6.36:
Replaced the remaining uses of png_size_t with size_t (Cosmin)
    Fixed the calculation of row_factor in png_check_chunk_length
      (reported by Thuan Pham in SourceForge issue #278)
    Added missing parentheses to a macro definition
      (suggested by "irwir" in GitHub issue #216)
    Optimized png_do_expand_palette for ARM processors.
    Improved performance by around 10-22% on a recent ARM Chromebook.
    (Contributed by Richard Townsend, ARM Holdings)
    Fixed manipulation of machine-specific optimization options.
    (Contributed by Vicki Pfau)
    Used memcpy instead of manual pointer arithmetic on Intel SSE2.
    (Contributed by Samuel Williams)
    Fixed build errors with MSVC on ARM64.
    (Contributed by Zhijie Liang)
    Fixed detection of libm in CMakeLists.
    (Contributed by Cameron Cawley)
    Fixed incorrect creation of pkg-config file in CMakeLists.
    (Contributed by Kyle Bentley)
    Fixed the CMake build on Windows MSYS by avoiding symlinks.
    Fixed a build warning on OpenBSD.
    (Contributed by Theo Buehler)
    Fixed various typos in comments.
    (Contributed by "luz.paz")
    Raised the minimum required CMake version from 3.0.2 to 3.1.
    Removed yet more of the vestigial support for pre-ANSI C compilers.
    Removed ancient makefiles for ancient systems that have been broken
    across all previous libpng-1.6.x versions.
    Removed the Y2K compliance statement and the export control
    information.

OBS-URL: https://build.opensuse.org/package/show/graphics/libpng16?expand=0&rev=111
2018-12-31 09:48:16 +00:00

146 lines
4.4 KiB
RPMSpec

#
# spec file for package libpng16
#
# Copyright (c) 2018 SUSE LINUX 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 https://bugs.opensuse.org/
#
#
%define major 1
%define minor 6
%define micro 36
%define branch %{major}%{minor}
%define libname libpng%{branch}-%{branch}
%define debug_package_requires %{libname} = %{version}-%{release}
Name: libpng16
Version: %{major}.%{minor}.%{micro}
Release: 0
Summary: Library for the Portable Network Graphics Format (PNG)
License: Zlib
Group: Development/Libraries/C and C++
Url: http://www.libpng.org/pub/png/libpng.html
Source0: http://prdownloads.sourceforge.net/libpng/libpng-%{version}.tar.xz
Source2: libpng16.keyring
Source3: rpm-macros.libpng-tools
Source4: baselibs.conf
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: zlib-devel
%package -n %{libname}
Summary: Library for the Portable Network Graphics Format (PNG)
Group: System/Libraries
Provides: libpng = %{version}
%package devel
Summary: Development tools for applications which will use libpng
Group: Development/Libraries/C and C++
Requires: %{libname} = %{version}
Requires: glibc-devel
Requires: pkgconfig
Requires: zlib-devel
Recommends: libpng%{branch}-compat-devel
#
%package compat-devel
Summary: Development tools for applications which will use libpng
Group: Development/Libraries/C and C++
Requires: libpng%{branch}-devel = %{version}
Conflicts: libpng-devel
Provides: libpng-devel = %{version}
Obsoletes: libpng-devel < 1.2.44
%package tools
Summary: Tools for Manipulating PNG Images
Group: Productivity/Graphics/Other
Conflicts: libpng-tools
Provides: libpng-tools = %{version}
%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 -q -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
make %{?_smp_mflags}
%check
make -j1 check
%install
%make_install
rm %{buildroot}/%{_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}
%{_libdir}/libpng%{branch}.so.*
%files devel
%{_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
%{_bindir}/libpng-config
%{_includedir}/*.h
%{_libdir}/libpng.so
%{_libdir}/pkgconfig/libpng.pc
%{_mandir}/man3/libpng.3%{ext_man}
%{_mandir}/man3/libpngpf.3%{ext_man}
%{_mandir}/man5/png.5%{ext_man}
%files tools
%{_bindir}/png-fix-itxt
%{_bindir}/pngfix
%{_sysconfdir}/rpm/macros.libpng-tools
%changelog