File zimg.spec of Package zimg

Name:           zimg
Version:        2.3
Release:        0
Summary:        Scaling, colorspace conversion, and dithering library 
Group:          System/Libraries
License:        WTFPL
URL:            https://github.com/sekrit-twc/%{name}
Source0:        %{name}-%{version}.tar.gz
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  pkg-config
BuildRequires:  gcc-c++

%description
The "z" library implements the commonly required image processing
basics of scaling, colorspace conversion, and depth conversion.

%package -n libzimg2
Obsoletes:      %{name} < %{version}
Provides:       %{name} = %{version}
Summary:        Scaling, colorspace conversion, and dithering library

%description -n libzimg2
The "z" library implements the commonly required image processing
basics of scaling, colorspace conversion, and depth conversion.

%package devel
Summary:        Development files for %{name}
Requires:       libzimg2 = %{version}
Group:          Development/Libraries/C and C++

%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.

%prep
%autosetup -n %{name}-release-%{version}

%build
./autogen.sh
%configure --docdir=%{_docdir}/%{name} \
           --enable-x86simd \
           --disable-static
%make_build

%install
%make_install
find %{buildroot} -iname '*.la' -delete

%files -n libzimg2
%defattr(-, root, root)
%{_libdir}/libzimg.so.*
%dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/COPYING
%doc %{_docdir}/%{name}/README.md
%doc %{_docdir}/%{name}/ChangeLog

%files devel
%defattr(-, root, root)
%{_includedir}/*
%{_libdir}/libzimg.so
%{_libdir}/pkgconfig/
%{_docdir}/zimg/example/

%post -n libzimg2 -p /sbin/ldconfig
%postun -n libzimg2 -p /sbin/ldconfig

%changelog