File opentk.spec of Package opentk
#
# spec file for package opentk
#
# Copyright (c) 2014 SUSE LINUX Products 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/
#
Name: opentk
Version: 1.1.4
Release: 1
License: MIT
Url: http://www.opentk.com/
Source: http://downloads.sourceforge.net/project/opentk/opentk/opentk-1.1/stable-5/opentk-2014-07-23.zip
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: dos2unix
BuildRequires: unzip
BuildRequires: mono-devel
Recommends: Mesa-libGL1 Mesa-libGLU1
Recommends: libopenal0-soft freealut
Recommends: sdl2
BuildArch: noarch
Group: Development/Libraries/Mono
Summary: OpenGL, OpenGL (ES), OpenAL and OpenCL bindings for Mono
%description
The Open Toolkit is an advanced, low-level C# library that wraps OpenGL,
OpenCL and OpenAL. It is suitable for games, scientific applications and
any other project that requires 3d graphics, audio or compute functionality.
%package doc
Group: Documentation/Other
Summary: The Open Toolkit for Mono, Documentation
%description doc
This package contains links to the OpenGL and OpenTK API specifications.
%prep
%setup -c %{name}-%{version}
%build
xbuild
%install
mkdir -p %{buildroot}%{_prefix}/lib/mono/opentk
install Binaries/OpenTK/Debug/OpenTK*.dll %{buildroot}%{_prefix}/lib/mono/opentk
install Binaries/OpenTK/Debug/OpenTK*.dll.config %{buildroot}%{_prefix}/lib/mono/opentk
mkdir -p %{buildroot}%{_datadir}/doc/opentk
install -m 0644 Documentation/*.txt %{buildroot}%{_datadir}/doc/opentk
install -m 0644 Documentation/*.html %{buildroot}%{_datadir}/doc/opentk
chmod -x %{buildroot}%{_prefix}/lib/mono/opentk/*.config
dos2unix %{buildroot}%{_prefix}/lib/mono/opentk/*.config
dos2unix %{buildroot}%{_datadir}/doc/opentk/*.txt
%post
# install the assemblies of these libraries into the global assembly cache that the Mono compiler uses
gacutil -i %{_prefix}/lib/mono/opentk/OpenTK.dll
gacutil -i %{_prefix}/lib/mono/opentk/OpenTK.Compatibility.dll
gacutil -i %{_prefix}/lib/mono/opentk/OpenTK.GLControl.dll
%postun
gacutil -u %{_prefix}/lib/mono/opentk/OpenTK.dll
gacutil -u %{_prefix}/lib/mono/opentk/OpenTK.Compatibility.dll
gacutil -u %{_prefix}/lib/mono/opentk/OpenTK.GLControl.dll
%files
%defattr(-,root,root)
%{_prefix}/lib/mono/opentk/
%files doc
%defattr(-,root,root)
%{_datadir}/doc/opentk
%changelog