3 %bcond_without tests # do not perform "make test"
5 Summary: Library for nonlinear optimization
6 Summary(pl.UTF-8): Biblioteka do nieliniowej optymalizacji
10 License: LGPL v2.1, MIT
12 #Source0Download: https://github.com/stevengj/nlopt/releases
13 Source0: https://github.com/stevengj/nlopt/archive/v%{version}/%{name}-%{version}.tar.gz
14 # Source0-md5: ed1a3000a1c8c248d51df126dfcfaa78
16 URL: https://nlopt.readthedocs.io
17 BuildRequires: cmake >= 3.2
19 BuildRequires: libstdc++-devel
21 BuildRequires: python3-devel
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 NLopt is a free/open-source library for nonlinear optimization,
27 providing a common interface for a number of different free
28 optimization routines available online as well as original
29 implementations of various other algorithms.
31 %description -l pl.UTF-8
32 Biblioteka do nieliniowej optymalizacji
35 Summary: Development files for NLopt
36 Summary(pl.UTF-8): Pliki programistyczne biblioteki NLopt
37 License: AGPL v3+ and BSD
38 Group: Development/Libraries
39 Requires: %{name} = %{version}-%{release}
42 Development files for NLopt.
44 %description devel -l pl
45 Pliki programistyczne biblioteki NLopt.
47 %package -n python3-nlopt
48 Summary: Python 3 bindings for NLopt
49 Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki NLopt
50 Group: Libraries/Python
51 Requires: %{name} = %{version}-%{release}
53 %description -n python3-nlopt
54 Python 3 bindings for NLopt
56 %description -n python3-nlopt -l pl.UTF-8
57 Wiązania Pythona 3 do biblioteki NLopt
59 %package -n guile-nlopt
60 Summary: Guile bindings for NLopt
61 Summary(pl.UTF-8): Wiązania Guile do biblioteki NLopt
63 Requires: %{name} = %{version}-%{release}
65 %description -n guile-nlopt
66 Guile bindings for NLopt
68 %description -n guile-nlopt -l pl.UTF-8
69 Wiązania Guile do biblioteki NLopt
71 %package -n octave-nlopt
72 Summary: Octave interface for NLopt
73 Summary(pl.UTF-8): Interfejs Octave do biblioteki NLopt
74 Group: Applications/Math
75 Requires: %{name} = %{version}-%{release}
77 %description -n octave-nlopt
78 Octave interface for NLopt
80 %description -n octave-nlopt -l pl.UTF-8
81 Interfejs Octave do biblioteki NLopt
92 -DNLOPT_TESTS=%{?with_tests:ON}%{?!with_tests:OFF}
95 %{?with_tests:%{__make} test ARGS=--output-on-failure}
98 rm -rf $RPM_BUILD_ROOT
99 install -d $RPM_BUILD_ROOT%{py3_sitedir}
101 %{__make} -C build install \
102 DESTDIR=$RPM_BUILD_ROOT
105 rm -rf $RPM_BUILD_ROOT
107 %post -p /sbin/ldconfig
108 %postun -p /sbin/ldconfig
111 %defattr(644,root,root,755)
112 %doc AUTHORS COPYING COPYRIGHT NEWS.md README.md TODO
113 %attr(755,root,root) %{_libdir}/libnlopt.so.*.*.*
114 %attr(755,root,root) %ghost %{_libdir}/libnlopt.so.0
117 %defattr(644,root,root,755)
118 %attr(755,root,root) %{_libdir}/libnlopt.so
119 %{_includedir}/nlopt.h*
120 %{_libdir}/cmake/nlopt
121 %{_pkgconfigdir}/nlopt.pc
122 %{_mandir}/man3/nlopt*.3*
124 %files -n python3-nlopt
125 %defattr(644,root,root,755)
126 %attr(755,root,root) %{py3_sitedir}/_nlopt.so
127 %{py3_sitedir}/nlopt.py
129 %files -n guile-nlopt
130 %defattr(644,root,root,755)
131 %attr(755,root,root) %{_libdir}/guile/3.0/extensions/nlopt_guile.so
132 %{_datadir}/guile/site/3.*/nlopt.scm
134 %files -n octave-nlopt
135 %defattr(644,root,root,755)
136 %attr(755,root,root) %{_libdir}/octave/*/site/oct/x86_64-pld-linux-gnu/nlopt_optimize.oct
137 %{_datadir}/octave/*/site/m/*.m