File osgART.spec of Package osgART
#
# spec file for package osgART
#
# Copyright (c) 2024 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 major 1
%define osg_version 1.2
Name: osgART
Version: 1.0
Release: 0
Summary: Adapter to use the ARToolKit inside OpenSceneGraph
License: GPL-2.0-only
Group: Development/Libraries/X11
URL: https://www.artoolworks.com/community/osgart/
Source0: %{name}-%{version}.tar.bz2
# SOURCE-FEATURE-UPSTREAM GNUmakefile adam@mizerski.pl -- Adds sonames to libraries. Contains changes made by noARTpath.patch and ARToolKitPlus-tracker.patch
Source1: GNUmakefile
# PATCH-FIX-UPSTREAM osgART-1.0-abuild.patch adam@mizerski.pl -- Adds missing libraries and fixes mistake in macros
Patch0: %{name}-1.0-abuild.patch
# PATCH-FEATURE-OPENSUSE osgART-1.0-noARTpath.patch adam@mizerski.pl -- ARToolKit is in another package
Patch1: %{name}-1.0-noARTpath.patch
Patch2: %{name}-1.0-ARToolKitPlus-tracker.patch
BuildRequires: ARToolKit_v4l-devel
BuildRequires: freeglut-devel
BuildRequires: gcc-c++
BuildRequires: libARToolKitPlus-devel
#BuildRequires: bakefile python-xml
BuildRequires: libOpenSceneGraph-devel = 1.2
BuildRequires: libOpenThreads-devel = 1.5.0
BuildRequires: libProducer-devel = 1.1.0
%description
OSGART is a library that simplifies the development of Augmented Reality or Mixed Reality applications by combining the well-known ARToolKit tracking library with OpenSceneGraph. But rather than acting just as a simple nodekit, the library offers 3 main functionalities: high level integration of video input (video object, shaders), spatial registration (marker-based, multiple trackers), and photometric registration (occlusion, shadow).
%package -n lib%{name}%{major}
Summary: Adapter to use the ARToolKit inside OpenSceneGraph
Group: Development/Libraries/X11
%description -n lib%{name}%{major}
OSGART is a library that simplifies the development of Augmented Reality or Mixed Reality applications by combining the well-known ARToolKit tracking library with OpenSceneGraph. But rather than acting just as a simple nodekit, the library offers 3 main functionalities: high level integration of video input (video object, shaders), spatial registration (marker-based, multiple trackers), and photometric registration (occlusion, shadow).
%package -n lib%{name}-devel
Summary: Adapter to use the ARToolKit inside OpenSceneGraph headers
Group: Development/Libraries/X11
Requires: lib%{name}%{major} = %{version}
%description -n lib%{name}-devel
This package contains files that are needed for development using osgART.
%prep
%autosetup -p1
pushd bin
#bakefile -f gnu osgART.bkl
cp %{SOURCE1} .
popd
%build
export CPPFLAGS="%{optflags}"
pushd bin
%make_build
popd
%install
install -D -d %{buildroot}%{_libdir}/osgPlugins-%{osg_version}
mv bin/osgart*.so %{buildroot}%{_libdir}/osgPlugins-%{osg_version}/
mv bin/lib*.so* %{buildroot}%{_libdir}/
install -D -d %{buildroot}%{_includedir}/
cp -r include/%{name} %{buildroot}%{_includedir}/
%post -n lib%{name}%{major} -p /sbin/ldconfig
%postun -n lib%{name}%{major} -p /sbin/ldconfig
%post -n lib%{name}-devel -p /sbin/ldconfig
%postun -n lib%{name}-devel -p /sbin/ldconfig
%files -n lib%{name}%{major}
%{_libdir}/*.so.*
%dir %{_libdir}/osgPlugins-%{osg_version}
%{_libdir}/osgPlugins-%{osg_version}/*.so
%license LICENSE.txt
%doc AUTHORS README
%files -n lib%{name}-devel
%{_libdir}/*.so
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*
%changelog