Accepting request 517559 from home:lachs0r

Renamed to zimg to match upstream name (see OBS request #516938).

OBS-URL: https://build.opensuse.org/request/show/517559
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/zimg?expand=0&rev=1
This commit is contained in:
Ismail Dönmez
2017-08-18 12:30:00 +00:00
committed by Git OBS Bridge
parent 1c048ba417
commit 39bc959ede
7 changed files with 97 additions and 157 deletions

103
zimg.spec
View File

@@ -1,7 +1,7 @@
#
# spec file for package zimg
# spec file for package libzimg
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 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
@@ -15,66 +15,77 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define sover 2
Name: zimg
Version: 5.0.0
Summary: Scaling, colorspace conversion, and dithering library
Version: 2.6a
Release: 0
Summary: Display 2-D data of arbitrary format
License: BSD-3-Clause
Group: Productivity/Graphics/Visualization/Graph
Url: http://sourceforge.net/projects/zimg/
Source0: http://sourceforge.net/projects/zimg/files/zimg/zimg-%{version}/%{name}-%{version}.tar.gz
Source1: %{name}.changes
Patch0: %{name}-%{version}.patch
Patch1: zimg-automake-1.13.patch
Url: https://github.com/sekrit-twc/zimg
Source0: https://github.com/sekrit-twc/zimg/archive/release-%{version}.tar.gz
License: WTFPL
Group: Development/Libraries/C and C++
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: freetype2-devel
BuildRequires: gd-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: xorg-x11
BuildRequires: xorg-x11-devel
Requires: ImageMagick
Requires: gd >= 1.8.3
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: pkgconfig
%description
zimg generates png images from arbitrary formatted f(x,y) data. Both
plain unformatted ascii and a variety of binary input formats are
supported. Output options include variable logarithmic color mapping
VLCM and contour graphics and lots of color maps. zimg is a fast
converter.
The "z" image library implements the commonly required image processing
basics of scaling, colorspace conversion, and depth conversion.
%package -n libzimg%{sover}
Summary: Scaling, colorspace conversion, and dithering library
Group: System/Libraries
%description -n libzimg%{sover}
The "z" image library implements the commonly required image processing
basics of scaling, colorspace conversion, and depth conversion.
%package devel
Summary: Development files for libzimg%{sover}
Group: Development/Libraries/C and C++
Requires: libzimg%{sover} = %{version}
%description devel
The libzimg-devel package contains libraries and header files for
developing applications that use libzimg%{sover}.
%prep
%setup -q
%patch0
%patch1 -p1
# Do not include build time
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{SOURCE1}")"
DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\""
TIME="\"$(date -d "${modified}" "+%%R")\""
find . -name '*.[ch]' |\
xargs sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g"
%setup -n zimg-release-%{version}
%build
autoreconf -fi
./autogen.sh
%configure \
--with-gd-includes=%{_includedir}/ \
--with-x-viewer=display \
--with-gd-lib=%{_libdir} \
--with-jpeg-lib=%{_libdir}
make xpm_libs="-L/usr/X11R6/%{_lib} -lXpm -lX11" %{?_smp_mflags}
--docdir=%{_docdir}/libzimg \
--enable-x86simd \
--disable-static
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
rm -f %{buildroot}%{_includedir}/zimg.h
%makeinstall
find %{buildroot} -iname '*.la' -delete
%files
%post -n libzimg%{sover} -p /sbin/ldconfig
%postun -n libzimg%{sover} -p /sbin/ldconfig
%files -n libzimg%{sover}
%defattr(-,root,root)
%doc README ChangeLog AUTHORS COPYING NEWS TODO
%{_bindir}/zimg
%{_mandir}/man1/zimg*
%{_libdir}/libzimg.so.2
%{_libdir}/libzimg.so.2.0.0
%dir %{_docdir}/libzimg
%doc %{_docdir}/libzimg/COPYING
%doc %{_docdir}/libzimg/README.md
%doc %{_docdir}/libzimg/ChangeLog
%files devel
%defattr(-,root,root)
%{_includedir}/zimg.h
%{_includedir}/zimg++.hpp
%{_libdir}/libzimg.so
%{_libdir}/pkgconfig/zimg.pc
%{_docdir}/libzimg/example/
%changelog