SHA256
1
0
forked from pool/libmng
libmng/libmng.spec
Ismail Dönmez 9f05eda9f8 Accepting request 234476 from home:sumski:branches:graphics
- Update to 2.0.2
  * Added support for lcms2.
  * Added support for libjpeg version 9.
- Bump %lname to libmng2, per upstream change (also adjusted baselibs)
- Switch to CMake buildsystem: added cmake BuildRequires
- Added pkg-config and man BuildRequires
- BuildRequire liblcms2-devel instead of liblcms-devel
- Drop libmng-no-jpeg.diff and libmng.diff, not needed with good, CMake
  buildsystem

OBS-URL: https://build.opensuse.org/request/show/234476
OBS-URL: https://build.opensuse.org/package/show/graphics/libmng?expand=0&rev=14
2014-05-20 09:22:30 +00:00

120 lines
3.3 KiB
RPMSpec

#
# spec file for package libmng
#
# Copyright (c) 2014 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/
#
Name: libmng
Version: 2.0.2
Release: 0
Summary: Library for Support of MNG and JNG Formats
License: Zlib
Group: Development/Libraries/C and C++
%define lname libmng2
BuildRequires: cmake
BuildRequires: libjpeg-devel
BuildRequires: liblcms2-devel
BuildRequires: man
BuildRequires: pkg-config
BuildRequires: zlib-devel
# bug437293
%ifarch ppc64
Obsoletes: libmng-64bit
%endif
#
Url: http://www.libmng.com/
Source0: http://downloads.sourceforge.net/project/%{name}/%{name}-devel/%{version}/%{name}-%{version}.tar.xz
Source1: baselibs.conf
Patch0: libmng-1.0.9-dont-leak-zlib-streams.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This library can handle MNG and JNG formats that contain animated
pictures. These formats should replace the GIF format.
%package -n %lname
Summary: Library for Support of MNG and JNG Formats
Group: System/Libraries
# O/P added 2011-11-29
Obsoletes: libmng < %{version}-%{release}
Provides: libmng = %{version}-%{release}
%description -n %lname
This library can handle MNG and JNG formats that contain animated
pictures. These formats should replace the GIF format.
%package devel
Summary: Include Files and Libraries mandatory for Development
Group: Development/Libraries/C and C++
Requires: %lname = %{version}
Requires: libjpeg-devel
Requires: liblcms-devel
Requires: zlib-devel
# bug437293
%ifarch ppc64
Obsoletes: libmng-devel-64bit
%endif
#
%description devel
This library can handle MNG and JNG formats which contain animated
pictures. These formats should replace the GIF format.
This package contains the static library and the header files.
%prep
%setup -q
%patch0
%build
# This is not zlib licensed and unused, just as a caution, bnc#744320
rm -rf contrib
export CXXFLAGS="%{optflags}"
export CFLAGS="$CXXFLAGS"
mkdir build && cd build && \
cmake -DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_SKIP_RPATH=ON \
-DMNG_INSTALL_DOC_DIR=%{_datadir}/doc/packages/%{name} \
-DBUILD_MAN=ON \
-DBUILD_STATIC_LIBS=OFF ..
make %{?_smp_mflags}
%install
%make_install -C build
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files -n %lname
%defattr(-,root,root)
%doc LICENSE README doc/doc.readme doc/libmng.txt
%{_libdir}/libmng.so.*
%files devel
%defattr(-,root,root)
%{_includedir}/*.h
%doc %{_mandir}/*/*
%doc %{_docdir}/libmng/
%{_libdir}/pkgconfig/libmng.pc
%{_libdir}/libmng.so
%{_datadir}/mng-2.0/
%changelog