File gfxprim.spec of Package gfxprim

#
# GFXprim specfile
#
# (C) Cyril Hrubis metan{at}ucw.cz 2013-2020
#
# Distributed under LGPLv2.1+
#

Summary: Modular 2D bitmap graphics library
Name: gfxprim
Version: git
Release: 1
License: LGPL-2.1+
Group: System/Libraries
Url: http://gfxprim.ucw.cz
Source: gfxprim-%{version}.tar.gz
# Image Loaders
BuildRequires: libwebp-devel libjpeg-devel libpng-devel giflib-devel libtiff-devel
# X11 && freetype
%if %{defined fedora}
BuildRequires: libX11-devel
BuildRequires: freetype-devel
%else
BuildRequires: xorg-x11-devel
BuildRequires: freetype2-devel
BuildRequires: fontconfig-devel
%endif
# Widgets
%if %{defined fedora}
BuildRequires: json-c-devel
%else
BuildRequires: libjson-c-devel
%endif
# xcb backend
%if 0%{?suse_version} >= 1310 || 0%{?fedora_version} >= 25 || 0%{?centos_version} >= 6
BuildRequires: xcb-util-keysyms-devel
%endif
# Python bindings
BuildRequires: swig python-devel

BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot

%description
This is GFXprim library. GFXprim is Open-source modular 2D bitmap graphics
library with emphasis on speed and correctness.

%package -n libgfxprim1
Provides: libgfxprim
Summary: Modular 2D bitmap graphics library
Group: System/Libraries

%description -n libgfxprim1
GFXprim is Open-source modular 2D bitmap graphics library with emphasis on
speed and correctness.

%package -n libgfxprim-loaders1
Summary: Modular 2D bitmap graphics library
Group: System/Libraries
Provides: libgfxprim-loaders
Requires: libgfxprim1

%description -n libgfxprim-loaders1
GFXprim is Open-source modular 2D bitmap graphics library with emphasis on
speed and correctness.

%package -n libgfxprim-backends1
Summary: Modular 2D bitmap graphics library
Group: System/Libraries
Provides: libgfxprim-backends
Requires: libgfxprim1

%description -n libgfxprim-backends1
GFXprim is Open-source modular 2D bitmap graphics library with emphasis on
speed and correctness.

%package -n libgfxprim-grabbers1
Summary: Modular 2D bitmap graphics library
Group: System/Libraries
Provides: libgfxprim-grabbers
Requires: libgfxprim1

%description -n libgfxprim-grabbers1
GFXprim is Open-source modular 2D bitmap graphics library with emphasis on
speed and correctness.

%package -n libgfxprim-widgets1
Summary: Minimalistic widget library written in C
Group: System/Libraries
Provides: libgfxprim-widgets
Requires: libgfxprim1 libgfxprim-backends1

%description -n libgfxprim-widgets1
Minimalistic widget library written in C.

%package -n libgfxprim-devel
Summary: GFXprim Library Developer Files
Group: Development/Libraries/C and C++
Requires: libgfxprim1 libgfxprim-loaders1 libgfxprim-backends1 libgfxprim-grabbers1 libgfxprim-widgets1

%description -n libgfxprim-devel
This package contains files needed for development with GFXprim library.

%package -n python-gfxprim
Summary: GFXprim python bindings
Group: System/Libraries

%description -n python-gfxprim
This package contains python bindings for GFXprim library.

%package -n spiv
Summary: Simple but powerful image viewer
Group: Productivity/Graphics/Viewers

%description -n spiv
This package contains spiv image viewer.

%prep
%setup -n gfxprim-%{version}

%build
./configure --prefix='/usr' --bindir=%{_bindir} --libdir=%{_libdir} --includedir=%{_includedir} --mandir=%{_mandir}
VERBOSE=1 make %{?jobs:-j%jobs}

%install
DESTDIR="$RPM_BUILD_ROOT" make install

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

%post -n libgfxprim-loaders1 -p /sbin/ldconfig
%postun -n libgfxprim-loaders1 -p /sbin/ldconfig

%post -n libgfxprim-backends1 -p /sbin/ldconfig
%postun -n libgfxprim-backends1 -p /sbin/ldconfig

%post -n libgfxprim-grabbers1 -p /sbin/ldconfig
%postun -n libgfxprim-grabbers1 -p /sbin/ldconfig

%post -n libgfxprim-widgets1 -p /sbin/ldconfig
%postun -n libgfxprim-widgets1 -p /sbin/ldconfig

%files -n libgfxprim1
%defattr(-,root,root)
%{_libdir}/libgfxprim.so.*

%files -n libgfxprim-loaders1
%defattr(-,root,root)
%{_libdir}/libgfxprim-loaders.so.*

%files -n libgfxprim-backends1
%defattr(-,root,root)
%{_libdir}/libgfxprim-backends.so.*

%files -n libgfxprim-grabbers1
%defattr(-,root,root)
%{_libdir}/libgfxprim-grabbers.so.*

%files -n libgfxprim-widgets1
%defattr(-,root,root)
%{_libdir}/libgfxprim-widgets.so.*

%files -n libgfxprim-devel
%defattr(-,root,root)
%{_libdir}/*.a
%{_libdir}/*.so
%{_includedir}/gfxprim/
%{_bindir}/gfxprim-config

%files -n python-gfxprim
%defattr(-,root,root)
%{_libdir}/python*/gfxprim/

%files -n spiv
%defattr(-,root,root)
%{_bindir}/spiv
%{_mandir}/man1/spiv.1.*

%changelog
* Sat Dec 12 2020 Cyril Hrubis <metan@ucw.cz>

  Add json-c depenency and package widget library

* Tue Dec 24 2013 Cyril Hrubis <metan@ucw.cz>

 Update to 1.0.0-rc1

* Wed May  8 2013 Cyril Hrubis <metan@ucw.cz>

 Initial version
openSUSE Build Service is sponsored by