File libSNL0_2.spec of Package libSNL
#
# spec file for package libSNL0_2
#
# 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 http://bugs.opensuse.org/
#
Name: libSNL0_2
Version: 0.2
Release: 0
Summary: Simple Nurbs Library
License: GPL-2.0-or-later
Group: System/Libraries
Url: http://libsnl.sourceforge.net
Source0: libSNL-svn20100213.tar.bz2
Patch0: 0001-Fix-incorrect-item-removal-in-ptrList.patch
Patch1: 0002-Fix-shared-library-build.patch
Patch2: 0003-Hide-missing-implementation-of-snlSurface-guessProjL.patch
Patch3: 0004-Do-not-enforce-namespace-std-in-all-headers.patch
Patch4: 0005-Remove-dangerous-ptrList-assignment-operator.patch
BuildRequires: gcc-c++
%description
libSNL is a library of routines used for the manipulation of NURBS
curves and surfaces.
%package devel
Summary: Header files for the libSNL library
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Provides: libSNL-devel
%description devel
libSNL is a library of routines used for the manipulation of NURBS
curves and surfaces.
libSNL-devel provides the header file for the libSNL library.
%prep
%autosetup -p1 -n libsnl
mv trunk/{license.txt,Doxyfile,src} .
rm -Rf trunk tags branches
%build
export CFLAGS="%{optflags}"
make -C src libSNL.so.%{version} %{?_smp_mflags}
make -C src test
%install
rm -rf %{buildroot}/*
mkdir -p %{buildroot}/%{_libdir}
cp -P src/libSNL* %{buildroot}/%{_libdir}
chmod 755 %{buildroot}/%{_libdir}/libSNL.so.%{version}
install -m 644 -D -t %{buildroot}/%{_includedir}/SNL src/*.h
%check
src/snlTest
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%license license.txt
%{_libdir}/libSNL.so.%{version}
%files devel
%{_includedir}/SNL/
%{_libdir}/libSNL.so
%changelog