File libnoise.spec of Package libnoise
#
# spec file for package libnoise
#
# Copyright (c) 2020 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 soname 0
Name: libnoise
Version: 1.0.0
Release: 0
Summary: Coherent noise-generating library
License: LGPL-2.0-or-later
Group: Development/Libraries/C and C++
URL: https://libnoise.sourceforge.net
Source0: https://download.sourceforge.net/libnoise/libnoisesrc-%{version}.zip
Patch0: libnoise-make.patch
BuildRequires: dos2unix
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: unzip
%description
libnoise is a portable C++ library that is used to generate coherent
noise, a type of smoothly-changing noise. libnoise can generate Perlin
noise, ridged multifractal noise, and other types of coherent-noise.
Coherent noise is often used by graphics programmers to generate
natural-looking textures, planetary terrain, and other things. The
mountain scene shown above was rendered in Terragen with a terrain
file generated by libnoise. You can also view some other examples of
what libnoise can do.
In libnoise, coherent-noise generators are encapsulated in classes
called noise modules. There are many different types of noise
modules. Some noise modules can combine or modify the outputs of other
noise modules in various ways; you can join these modules together to
generate very complex coherent noise.
%package -n libnoise%{soname}
Summary: Coherent noise-generating library
%description -n libnoise%{soname}
libnoise is a portable C++ library that is used to generate coherent
noise, a type of smoothly-changing noise. libnoise can generate Perlin
noise, ridged multifractal noise, and other types of coherent-noise.
Coherent noise is often used by graphics programmers to generate
natural-looking textures, planetary terrain, and other things. The
mountain scene shown above was rendered in Terragen with a terrain
file generated by libnoise. You can also view some other examples of
what libnoise can do.
In libnoise, coherent-noise generators are encapsulated in classes
called noise modules. There are many different types of noise
modules. Some noise modules can combine or modify the outputs of other
noise modules in various ways; you can join these modules together to
generate very complex coherent noise.
%package -n libnoise-devel
Summary: Development files for libnoise
Group: Development/Libraries/C and C++
Requires: libnoise%{soname} = %{version}
%description -n libnoise-devel
The libnoise-devel package contains libraries and header files for
developing applications that use libnoise.
%prep
%setup -q -c -n noise
dos2unix COPYING.txt
cd noise
%patch -P 0
# add libtool tag
sed -i 's,\(--mode=\(compile\|link\)\) \$(\(CC\|CXX\)),--tag=\3 &,' `find . -name Makefile`
dos2unix doc/html/doxygen.css
%build
cd noise/src
%make_build
cd ..
%make_build
%install
pushd noise
rm include/Makefile
mkdir -p %{buildroot}%{_includedir}/noise/
cp -R include/* %{buildroot}%{_includedir}/noise/
mkdir -p %{buildroot}%{_libdir}
cp lib/libnoise.so.0.3 %{buildroot}%{_libdir}
find %{buildroot} -type f -name "*.la" -delete -print
ln -sf libnoise.so.0.3 %{buildroot}%{_libdir}/libnoise.so.0.3.0
ln -sf libnoise.so.0.3 %{buildroot}%{_libdir}/libnoise.so
ln -sf libnoise.so.0.3 %{buildroot}%{_libdir}/libnoise.so.0
%ldconfig_scriptlets -n libnoise%{soname}
%files -n libnoise%{soname}
%license COPYING.txt
%{_libdir}/*.so.*
%files -n libnoise-devel
%{_includedir}/*
%{_libdir}/*.so
%changelog