File libgltf.spec of Package libgltf

#
# spec file for package libgltf
#
# 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
# 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/
#


%define libname libgltf-0_1-1
Name:           libgltf
Version:        0.1.0
Release:        0
Summary:        C++ Library for rendering OpenGL models stored in glTF format
License:        MPL-2.0
Group:          Productivity/Publishing/Word
Url:            http://dev-www.libreoffice.org/src/libgltf/
Source:         http://dev-www.libreoffice.org/src/libgltf/%{name}-%{version}.tar.gz
BuildRequires:  Mesa-devel
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  glm-devel
BuildRequires:  pkgconfig
BuildRequires:  xz
BuildRequires:  pkgconfig(cppunit)
BuildRequires:  pkgconfig(epoxy) >= 1.3.1
BuildRequires:  pkgconfig(libpng)
%if 0%{?suse_version} > 1325
BuildRequires:  libboost_headers-devel
%else
BuildRequires:  boost-devel
%endif

%description
%{name} is a library for rendering OpenGL models stored in glTF format

%package -n %{libname}
Summary:        C++ Library for rendering OpenGL models stored in glTF format
Group:          System/Libraries

%description -n %{libname}
%{name} is a library for rendering OpenGL models stored in glTF format

%package devel
Summary:        C++ Library for rendering OpenGL models stored in glTF format
Group:          Development/Libraries/C and C++
Requires:       %{libname} = %{version}

%description devel
%{name} is a library for rendering OpenGL models stored in glTF format

%prep
%setup -q

%build
export CXXFLAGS="%{optflags} -fvisibility-inlines-hidden"
%configure \
	--disable-werror \
	--enable-tests \
	--disable-static \
	--docdir=%{_docdir}/%{name}
make %{?_smp_mflags} V=1

%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
rm -f %{buildroot}%{_datadir}/%{name}/html*.css
%fdupes -s %{buildroot}%{_docdir}/%{name}/html

%check
# Tests require running X server with working GL
#make %{?_smp_mflags} check
:

%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig

%files -n %{libname}
%defattr(-,root,root)
%doc AUTHORS NEWS LICENSE README ChangeLog
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root)
%{_libdir}/*.so
%{_libdir}/pkgconfig/libg*.pc
%{_includedir}/libg*

%changelog
openSUSE Build Service is sponsored by