File mingw64-vsgXchange.spec of Package mingw64-vsgXchange

#
# spec file for package mingw64-vsgXchange
#
# Copyright (c) 2021 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#

%define gdal 0
%define osg 0
%define _vsg_so_nr 0

%define _name   vsgXchange
Name:           mingw64-%{_name}
Version:        1.0.5
Release:        0
Summary:        3D graphics toolkit
License:        MIT
Group:          Productivity/Graphics/Other
URL:            https://vsg-dev.github.io/VulkanSceneGraph
Source0:        https://github.com/vsg-dev/%{_name}/archive/%{_name}-%{version}.tar.xz
BuildRequires:  mingw64-assimp-devel
BuildRequires:  mingw64-cross-cmake
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-freetype-devel
%if %gdal
BuildRequires:  mingw64-gdal-devel
%endif
BuildRequires:  mingw64-libcurl-devel
%if %osg
BuildRequires:  mingw64-libOpenSceneGraph-devel >= 3.6
BuildRequires:  mingw64-libosg2vsg-devel
%endif
BuildRequires:  mingw64-libvsg-devel
BuildRequires:  mingw64-vulkan-devel
%_mingw64_package_header_debug
BuildArch:      noarch

%description
Utility library for converting data+materials to/from VulkanSceneGraph.

%package -n mingw64-libvsgXchange%{_vsg_so_nr}
Summary:        Shared libraries for vsgXchange
Group:          System/Libraries

%description -n mingw64-libvsgXchange%{_vsg_so_nr}
The VulkanSceneGraph is a graphics toolkit for the development of
graphic applications such as flight simulators, games, virtual
reality and scientific visualization. Based around the concept of a
scene graph, it provides an object-oriented framework on top of
Vulkan.

This package contains the shared libraries for vsgXchange.

%package -n mingw64-libvsgXchange-devel
Summary:        VulkanSceneGraph development files
Group:          Development/Libraries/C and C++
Requires:       mingw64-libvsgXchange%{_vsg_so_nr} == %{version}
%if %osg
Requires:       mingw64-libOpenSceneGraph-devel >= 3.6
Requires:       mingw64-libOpenThreads-devel >= 3.6
%endif

%description -n mingw64-libvsgXchange-devel
The VulkanSceneGraph is a graphics toolkit for the development of
graphic applications such as flight simulators, games, virtual
reality and scientific visualization. Based around the concept of a
scene graph, it provides an object-oriented framework on top of
Vulkan.

This package contains the development header and libraries for vsgXchange.

%_mingw64_debug_package

%prep
%autosetup -p1 -n %{_name}-%{version}

%build
%_mingw64_cmake \
    -DBUILD_SHARED_LIBS=ON \
    -DCMAKE_RELWITHDEBINFO_POSTFIX=

%_mingw64_cmake_build

%install
%_mingw64_cmake_install


%files
%defattr(-,root,root)
%_mingw64_bindir/vsgconv.exe

%files -n mingw64-libvsgXchange%{_vsg_so_nr}
%defattr(-,root,root)
%license LICENSE.md 
%_mingw64_bindir/lib*.dll

%files -n mingw64-libvsgXchange-devel
%defattr(-,root,root)
%_mingw64_includedir/vsg*/
%_mingw64_libdir/lib*.dll.a
%_mingw64_libdir/cmake

%changelog
openSUSE Build Service is sponsored by