]> git.pld-linux.org Git - SPECS.git/blob - nlopt.spec
SPECS updated Tue 30 Apr 15:06:09 CEST 2024
[SPECS.git] / nlopt.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4
5 Summary:        Library for nonlinear optimization
6 Summary(pl.UTF-8):      Biblioteka do nieliniowej optymalizacji
7 Name:           nlopt
8 Version:        2.7.1
9 Release:        0.1
10 License:        LGPL v2.1, MIT
11 Group:          Libraries
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
15 Patch0:         python.patch
16 URL:            https://nlopt.readthedocs.io
17 BuildRequires:  cmake >= 3.2
18 BuildRequires:  guile
19 BuildRequires:  libstdc++-devel
20 BuildRequires:  octave
21 BuildRequires:  python3-devel
22 BuildRequires:  swig
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
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.
30
31 %description -l pl.UTF-8
32 Biblioteka do nieliniowej optymalizacji
33
34 %package devel
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}
40
41 %description devel
42 Development files for NLopt.
43
44 %description devel -l pl
45 Pliki programistyczne biblioteki NLopt.
46
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}
52
53 %description -n python3-nlopt
54 Python 3 bindings for NLopt
55
56 %description -n python3-nlopt -l pl.UTF-8
57 Wiązania Pythona 3 do biblioteki NLopt
58
59 %package -n guile-nlopt
60 Summary:        Guile bindings for NLopt
61 Summary(pl.UTF-8):      Wiązania Guile do biblioteki NLopt
62 Group:          Libraries
63 Requires:       %{name} = %{version}-%{release}
64
65 %description -n guile-nlopt
66 Guile bindings for NLopt
67
68 %description -n guile-nlopt -l pl.UTF-8
69 Wiązania Guile do biblioteki NLopt
70
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}
76
77 %description -n octave-nlopt
78 Octave interface for NLopt
79
80 %description -n octave-nlopt -l pl.UTF-8
81 Interfejs Octave do biblioteki NLopt
82
83 %prep
84 %setup -q
85 %patch0 -p1
86
87 %build
88 mkdir build
89 cd build
90 %cmake .. \
91         -DNLOPT_MATLAB=OFF \
92         -DNLOPT_TESTS=%{?with_tests:ON}%{?!with_tests:OFF}
93
94 %{__make}
95 %{?with_tests:%{__make} test ARGS=--output-on-failure}
96
97 %install
98 rm -rf $RPM_BUILD_ROOT
99 install -d $RPM_BUILD_ROOT%{py3_sitedir}
100
101 %{__make} -C build install \
102         DESTDIR=$RPM_BUILD_ROOT
103
104 %clean
105 rm -rf $RPM_BUILD_ROOT
106
107 %post   -p /sbin/ldconfig
108 %postun -p /sbin/ldconfig
109
110 %files
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
115
116 %files devel
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*
123
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
128
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
133
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
This page took 1.972986 seconds and 3 git commands to generate.