Files
glm/glm.spec
Stephan Kulow 4707d1f60a Accepting request 185434 from devel:libraries:c_c++
- convert sources to UNIX format using dos2unix
- fix build on non x86 architectures (glm-nonx86.patch) (forwarded request 185423 from k0da)

OBS-URL: https://build.opensuse.org/request/show/185434
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/glm?expand=0&rev=2
2013-08-06 04:55:50 +00:00

105 lines
3.0 KiB
RPMSpec

#
# spec file for package glm
#
# Copyright (c) 2013 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: glm
Version: 0.9.4.4
Release: 0
Summary: Header only C++ mathematics library for graphics
License: MIT and GPL-2.0+
Group: Development/Libraries/C and C++
Url: http://glm.g-truc.net/
Source0: http://downloads.sourceforge.net/ogl-math/%{name}-%{version}/%{name}-%{version}.zip
Patch0: glm-nonx86.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
BuildRequires: cmake
BuildRequires: dos2unix
BuildRequires: gcc-c++
BuildRequires: unzip
%description
OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics
software based on the OpenGL Shading Language (GLSL) specification.
GLM provides classes and functions designed and implemented with the same naming
conventions and functionalities than GLSL so that when a programmer knows GLSL,
he knows GLM as well which makes it really easy to use.
%package devel
Summary: Header only C++ mathematics library for graphics
Group: Development/Libraries/C and C++
%description devel
OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics
software based on the OpenGL Shading Language (GLSL) specification.
GLM provides classes and functions designed and implemented with the same naming
conventions and functionalities than GLSL so that when a programmer knows GLSL,
he knows GLM as well which makes it really easy to use.
%package doc
Summary: Documentation for GLM library
Group: Documentation/Other
%description doc
This package provides the documentation for GLM library.
%prep
%setup -q
# Fix wrong-file-end-of-line-encoding
find ./ -type f -print0 |xargs -0 dos2unix -q
%ifnarch %{ix86} x86_64
%patch0 -p1
%endif
%build
mkdir build
cd build
cmake \
-DGLM_TEST_ENABLE=ON \
-DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
..
make %{?_smp_mflags}
%install
cd build
make install DESTDIR="%buildroot"
cd ..
install -D -m 644 util/FindGLM.cmake %{buildroot}%{_datadir}/cmake/Modules/FindGLM.cmake
%check
cd build
ctest %{_smp_mflags} --output-on-failure
%files devel
%defattr(-,root,root,-)
%{_includedir}/glm
%{_datadir}/cmake/Modules/FindGLM.cmake
%doc copying.txt
%files doc
%defattr(-,root,root,-)
%doc doc/api
%doc doc/glm.pdf
%doc readme.txt
%changelog