nlopt/nlopt.spec

98 lines
2.8 KiB
RPMSpec

Name: nlopt
Version: 2.8.0
Release: 1mamba
Summary: A library for nonlinear optimization
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://github.com/stevengj/nlopt
Source: https://github.com/stevengj/nlopt.git/v%{version}/nlopt-%{version}.tar.bz2
License: LGPL, MIT
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libgcc
BuildRequires: libguile-devel
BuildRequires: libpython311-devel
BuildRequires: libstdc++6-devel
BuildRequires: octave-devel
## AUTOBUILDREQ-END
BuildRequires: octave-devel >= 9.1.0-1mamba
BuildRequires: cmake
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description
nlopt is a library for nonlinear optimization, wrapping many algorithms for global and local, constrained or unconstrained, optimization
%package -n lib%{name}
Group: System/Libraries
Summary: Shared libraries for %{name}
%description -n lib%{name}
This package contains shared libraries for %{name}.
%package -n lib%{name}-devel
Group: Development/Libraries
Summary: Development files for %{name}
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description -n lib%{name}-devel
This package contains libraries and header files for developing applications that use %{name}.
%debug_package
%prep
%setup -q
%build
%cmake \
-DPython_EXECUTABLE=%{__python3} \
-DPython_INCLUDEDIR=%{python3_inc}
%cmake_build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%cmake_install
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -n lib%{name} -p /sbin/ldconfig
%postun -n lib%{name} -p /sbin/ldconfig
%files -n lib%{name}
%defattr(-,root,root)
%{_libdir}/libnlopt.so.*
%{_libdir}/guile/3.0/extensions/nlopt_guile.so
%{_libdir}/octave/*/site/oct/*-openmamba-linux-gnu*/nlopt_optimize.oct
%{python3_sitearch}/nlopt.py
%{python3_sitearch}/_nlopt.cpython-*.so
%doc AUTHORS COPYING
%files -n lib%{name}-devel
%defattr(-,root,root)
%{_includedir}/nlopt.h
%{_includedir}/nlopt.hpp
%{_libdir}/libnlopt.so
%{_libdir}/pkgconfig/nlopt.pc
%dir %{_libdir}/cmake/nlopt
%{_libdir}/cmake/nlopt/NLopt*.cmake
%{_mandir}/man3/nlopt.3*
%{_mandir}/man3/nlopt_minimize.3*
%{_mandir}/man3/nlopt_minimize_constrained.3*
%{_datadir}/guile/site/3.0/nlopt.scm
%{_datadir}/octave/*/site/m/*.m
%doc ChangeLog README.md TODO
%changelog
* Wed Aug 14 2024 Automatic Build System <autodist@openmamba.org> 2.8.0-1mamba
- automatic version update by autodist
* Thu Apr 04 2024 Automatic Build System <autodist@mambasoft.it> 2.7.1-2mamba
- rebuilt by autoport with build requirements: octave-devel>=9.1.0-1mamba
* Mon Dec 25 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 2.7.1-1mamba
- package created using the webbuild interface