File gl3n.spec of Package gl3n
#
# spec file for package gl3n
#
# Copyright (c) 2016 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 so_ver 1
%define libname lib%{name}-ldc%{so_ver}
Name: gl3n
Version: 1.4.1
Release: 0
Summary: An OpenGL Mathematics library for D
License: MIT
Group: Development/Libraries/Other
Url: http://dav1dde.github.io/gl3n/
Source: https://github.com/Dav1dde/gl3n/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# For owner of geany dir
BuildRequires: geany
BuildRequires: ldc
BuildRequires: ldc-phobos-devel
BuildRequires: ldc-runtime-devel
BuildRequires: pkgconfig
%description
gl3n provides all the math you need to work with OpenGL. Currently gl3n supports:
- linear algebra
* vectors
* matrices
* quaternions
- geometry
* axis aligned bounding boxes
* planes
* frustum
- interpolation
* linear interpolation (lerp)
* spherical linear interpolation (slerp)
* hermite interpolation
* catmull rom interpolation
- nearly all GLSL defined functions (according to spec 4.1)
- the power of D, e.g. dynamic swizzling, templated types (vectors, matrices, quaternions),
impressive constructors and more!
%package -n %{libname}
Summary: Library of gl3n
Group: Development/Libraries/Other
%description -n %{libname}
Shared library needed for using gl3n.
%package devel
Summary: Development files for gl3n
Requires: %{libname} = %{version}
%description devel
gl3n provides all the math you need to work with OpenGL.
This packages provides all files needed for Development with gl3n:
Header, pkgconfig file, geany tags etc
%prep
%setup -q
%build
export DCFLAGS="-release -w -g -O2 -Igl3n"
make %{?_smp_mflags} all-shared geany-tag
%install
make %{?_smp_mflags} install-shared install-geany-tag \
PREFIX=%{buildroot}%{_prefix} \
LIB_DIR=%{buildroot}%{_libdir} \
DATA_DIR=%{buildroot}%{_datadir}
# Install missing files
install -m 644 -D README.markdown %{buildroot}%{_docdir}/%{name}/README
install -m 644 LICENSE %{buildroot}%{_docdir}/%{name}/LICENSE
# move documentation
mv %{buildroot}%{_datadir}/doc/gl3n/normal_doc/%{name}/* %{buildroot}%{_docdir}/%{name}/
rm -rf %{buildroot}%{_datadir}/doc/%{name}
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%files -n %{libname}
%license LICENSE
%{_libdir}/lib%{name}-ldc.so.*
%files devel
%doc %{_docdir}/%{name}
%dir %{_datadir}/geany/tags
%{_datadir}/geany/tags/gl3n.d.tags
%{_datadir}/pkgconfig/%{name}.pc
%{_libdir}/lib%{name}-ldc.so
%{_includedir}/d/%{name}
%changelog