diff --git a/README.md b/README.md index 5a95570..c970166 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # nlopt +nlopt is a library for nonlinear optimization, wrapping many algorithms for global and local, constrained or unconstrained, optimization + diff --git a/nlopt.spec b/nlopt.spec new file mode 100644 index 0000000..c9d5a75 --- /dev/null +++ b/nlopt.spec @@ -0,0 +1,87 @@ +Name: nlopt +Version: 2.7.1 +Release: 1mamba +Summary: A library for nonlinear optimization +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +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: libpython311-devel +BuildRequires: libstdc++6-devel +BuildRequires: octave-devel +## AUTOBUILDREQ-END +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 +%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.so +%{python3_sitearch}/nlopt.py +%doc AUTHORS COPYING + +%files -n lib%{name}-devel +%defattr(-,root,root) +%{_includedir}/nlopt.f +%{_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 +* Mon Dec 25 2023 Silvan Calarco 2.7.1-1mamba +- package created using the webbuild interface