]>
Commit | Line | Data |
---|---|---|
4afabe56 | 1 | # TODO: |
affae55c | 2 | # - install+package csharp bindings |
bb45edba JB |
3 | # |
4 | # Conditional build: | |
e117d02d | 5 | %bcond_with java # Java/JNI bindings |
affae55c | 6 | %bcond_with mono # .NET/C# bindings |
bb45edba | 7 | # |
06c68e42 | 8 | %define gitver openbabel-2-4-1 |
a5af8661 | 9 | Summary: A cross-platform chemistry program and library designed to convert file formats |
1d4e449f | 10 | Summary(pl.UTF-8): Międzyplatformowy program chemiczny i biblioteka do konwersji formatów plików |
a5af8661 | 11 | Name: openbabel |
06c68e42 | 12 | Version: 2.4.1 |
15b879f6 | 13 | Release: 12 |
a5af8661 | 14 | License: GPL v2 |
0424b5cd | 15 | Group: Libraries |
932da6d4 | 16 | #Source0Download: https://github.com/openbabel/openbabel/releases |
06c68e42 JR |
17 | Source0: https://github.com/openbabel/openbabel/archive/%{gitver}/%{name}-%{version}.tar.gz |
18 | # Source0-md5: c0e0aefeef0f9f2bb2c78109d65c30a5 | |
674189f4 | 19 | Patch0: %{name}-prefix.patch |
b6a15389 JR |
20 | Patch1: perl-x32.patch |
21 | Patch2: perl-install.patch | |
22 | Patch3: ruby-install.patch | |
06c68e42 | 23 | Patch4: gcc6.patch |
b6a15389 | 24 | Patch5: plugindir.patch |
02c53f12 | 25 | Patch6: cmake.patch |
6f5eb7df | 26 | Patch7: gcc12.patch |
932da6d4 | 27 | URL: http://openbabel.org/ |
674189f4 | 28 | BuildRequires: cairo-devel |
eebeb7a7 | 29 | BuildRequires: cmake >= 2.6.0 |
bb45edba | 30 | BuildRequires: eigen3 >= 3 |
61ea2b64 | 31 | BuildRequires: inchi-devel >= 1.0.3 |
bb45edba | 32 | %{?with_java:BuildRequires: jdk} |
7de8135f | 33 | BuildRequires: libstdc++-devel |
e32ffdba | 34 | BuildRequires: libxml2-devel >= 1:2.6.5 |
bb45edba | 35 | %{?with_mono:BuildRequires: mono-csharp} |
4afabe56 | 36 | BuildRequires: perl-devel |
957595f3 JP |
37 | BuildRequires: python |
38 | BuildRequires: python-modules | |
f3fb0901 JB |
39 | BuildRequires: rpm-perlprov |
40 | BuildRequires: rpm-pythonprov | |
a1a79d1f | 41 | BuildRequires: rpmbuild(macros) >= 1.605 |
674189f4 | 42 | BuildRequires: ruby-devel |
bb45edba | 43 | BuildRequires: swig >= 2.0 |
15b879f6 | 44 | BuildRequires: wxGTK3-unicode-devel |
e5243e3e | 45 | BuildRequires: zlib-devel |
8cdbb1ee | 46 | Requires: inchi-libs >= 1.0.3 |
a5af8661 PG |
47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
48 | ||
a5af8661 PG |
49 | %description |
50 | Open Babel is a project designed to pick up where Babel left off, as a | |
51 | cross-platform program and library designed to interconvert between | |
52 | many file formats used in molecular modeling and computational | |
53 | chemistry. | |
54 | ||
3796afb4 JR |
55 | %description -l pl.UTF-8 |
56 | Open Babel to projekt mający pozbierać to, co zostało po zaniechaniu | |
57 | projektu Babel, jako międzyplatformowy program i biblioteka służące do | |
58 | konwersji między wieloma formatami używanymi w modelowaniu cząsteczek | |
a92c668a JB |
59 | i chemii obliczeniowej. |
60 | ||
a0f4d9b2 PG |
61 | %package devel |
62 | Summary: Header files for OpenBabel | |
1d4e449f | 63 | Summary(pl.UTF-8): Pliki nagłówkowe dla OpenBabel |
0424b5cd | 64 | Group: Development/Libraries |
bf4a610f | 65 | Requires: %{name} = %{version}-%{release} |
4e28c439 | 66 | Requires: libstdc++-devel |
e5243e3e | 67 | Requires: zlib-devel |
4afabe56 | 68 | Obsoletes: openbabel-static |
a0f4d9b2 PG |
69 | |
70 | %description devel | |
71 | Header files for OpenBabel. | |
72 | ||
3796afb4 JR |
73 | %description devel -l pl.UTF-8 |
74 | Pliki nagłówkowe dla OpenBabel. | |
a0f4d9b2 | 75 | |
da41280c JB |
76 | %package gui |
77 | Summary: OpenBabel GUI | |
78 | Summary(pl.UTF-8): Graficzny interfejs użytkownika OpenBabel | |
79 | Group: X11/Applications/Science | |
80 | Requires: %{name} = %{version}-%{release} | |
81 | ||
82 | %description gui | |
83 | Graphical User Interface for OpenBabel. | |
84 | ||
85 | %description gui -l pl.UTF-8 | |
86 | Graficzny interfejs użytkownika OpenBabel. | |
87 | ||
bb45edba JB |
88 | %package -n java-openbabel |
89 | Summary: Java binding for OpenBabel | |
90 | Summary(pl.UTF-8): Wiązanie Javy do biblioteki OpenBabel | |
91 | Group: Libraries/Java | |
92 | ||
93 | %description -n java-openbabel | |
94 | Java binding for OpenBabel. | |
95 | ||
96 | %description -n java-openbabel -l pl.UTF-8 | |
97 | Wiązanie Javy do biblioteki OpenBabel. | |
98 | ||
66b3f4a0 JB |
99 | %package -n perl-Chemistry-OpenBabel |
100 | Summary: Perl binding for OpenBabel | |
101 | Summary(pl.UTF-8): Wiązanie Perla do biblioteki OpenBabel | |
102 | Group: Development/Languages/Perl | |
103 | Requires: %{name} = %{version}-%{release} | |
104 | ||
105 | %description -n perl-Chemistry-OpenBabel | |
106 | Perl binding for OpenBabel. | |
107 | ||
108 | %description -n perl-Chemistry-OpenBabel -l pl.UTF-8 | |
109 | Wiązanie Perla do biblioteki OpenBabel. | |
110 | ||
f3fb0901 JB |
111 | %package -n python-openbabel |
112 | Summary: Python binding for OpenBabel | |
113 | Summary(pl.UTF-8): Wiązanie Pythona do biblioteki OpenBabel | |
114 | Group: Libraries/Python | |
115 | Requires: %{name} = %{version}-%{release} | |
116 | ||
117 | %description -n python-openbabel | |
118 | Python binding for OpenBabel. | |
119 | ||
120 | %description -n python-openbabel -l pl.UTF-8 | |
121 | Wiązanie Pythona do biblioteki OpenBabel. | |
122 | ||
674189f4 JB |
123 | %package -n ruby-openbabel |
124 | Summary: Ruby binding for OpenBabel | |
125 | Summary(pl.UTF-8): Wiązanie języka Ruby do biblioteki OpenBabel | |
126 | Group: Development/Languages | |
127 | Requires: %{name} = %{version}-%{release} | |
128 | ||
129 | %description -n ruby-openbabel | |
130 | Ruby binding for OpenBabel. | |
131 | ||
132 | %description -n ruby-openbabel -l pl.UTF-8 | |
133 | Wiązanie języka Ruby do biblioteki OpenBabel. | |
134 | ||
a5af8661 | 135 | %prep |
932da6d4 | 136 | %setup -q -n %{name}-%{gitver} |
4afabe56 | 137 | %patch0 -p1 |
20f7e0a0 | 138 | %patch1 -p1 |
0f986b5a | 139 | %patch2 -p1 |
b6a15389 | 140 | %patch3 -p1 |
5bcb70dc WF |
141 | %patch4 -p1 |
142 | %patch5 -p1 | |
02c53f12 | 143 | %patch6 -p1 |
6f5eb7df | 144 | %patch7 -p1 |
a5af8661 PG |
145 | |
146 | %build | |
4afabe56 | 147 | %cmake . \ |
8cdbb1ee JB |
148 | -DBIN_INSTALL_DIR=%{_bindir} \ |
149 | -DLIB_INSTALL_DIR=%{_lib} \ | |
bb45edba | 150 | %{?with_mono:-DCSHARP_BINDINGS=ON} \ |
da41280c | 151 | -DCSHARP_EXECUTABLE=/usr/bin/mcs \ |
f3fb0901 | 152 | -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \ |
4afabe56 | 153 | -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \ |
bb45edba | 154 | %{?with_java:-DJAVA_BINDINGS=ON} \ |
674189f4 | 155 | -DOBPERL_INSTALLDIRS="vendor" \ |
bb45edba JB |
156 | -DPERL_BINDINGS=ON \ |
157 | -DPYTHON_BINDINGS=ON \ | |
158 | -DRUBY_BINDINGS=ON \ | |
b6a15389 | 159 | -DRUN_SWIG=ON \ |
8cdbb1ee | 160 | -DOPENBABEL_USE_SYSTEM_INCHI=ON \ |
15b879f6 | 161 | -DwxWidgets_CONFIG_EXECUTABLE=%{_bindir}/wx-gtk3-unicode-config \ |
b6a15389 JR |
162 | -DPERLLIB_INSTALL_DIR=%{perl_vendorarch} \ |
163 | -DRUBYLIB_INSTALL_DIR=%{ruby_vendorarchdir} | |
a5af8661 | 164 | %{__make} |
a5af8661 PG |
165 | |
166 | %install | |
167 | rm -rf $RPM_BUILD_ROOT | |
5bcb70dc | 168 | install -d $RPM_BUILD_ROOT%{py_sitedir} |
a5af8661 PG |
169 | |
170 | %{__make} install \ | |
20f7e0a0 | 171 | RUBYARCHDIR=$RPM_BUILD_ROOT%{ruby_vendorarchdir} \ |
a5af8661 PG |
172 | DESTDIR=$RPM_BUILD_ROOT |
173 | ||
0f986b5a JR |
174 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} |
175 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
f3fb0901 JB |
176 | %py_postclean |
177 | ||
bb45edba JB |
178 | %if %{with java} |
179 | install -d $RPM_BUILD_ROOT%{_javadir} | |
180 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/*.jar $RPM_BUILD_ROOT%{_javadir} | |
181 | %endif | |
182 | ||
a5af8661 PG |
183 | %clean |
184 | rm -rf $RPM_BUILD_ROOT | |
185 | ||
7de8135f JB |
186 | %post -p /sbin/ldconfig |
187 | %postun -p /sbin/ldconfig | |
188 | ||
a5af8661 PG |
189 | %files |
190 | %defattr(644,root,root,755) | |
b6a15389 | 191 | %doc AUTHORS README.md THANKS doc/*.html |
4afabe56 JB |
192 | %attr(755,root,root) %{_bindir}/babel |
193 | %attr(755,root,root) %{_bindir}/obabel | |
194 | %attr(755,root,root) %{_bindir}/obchiral | |
195 | %attr(755,root,root) %{_bindir}/obconformer | |
b6a15389 | 196 | %attr(755,root,root) %{_bindir}/obdistgen |
4afabe56 JB |
197 | %attr(755,root,root) %{_bindir}/obenergy |
198 | %attr(755,root,root) %{_bindir}/obfit | |
199 | %attr(755,root,root) %{_bindir}/obgen | |
200 | %attr(755,root,root) %{_bindir}/obgrep | |
201 | %attr(755,root,root) %{_bindir}/obminimize | |
202 | %attr(755,root,root) %{_bindir}/obprobe | |
203 | %attr(755,root,root) %{_bindir}/obprop | |
bb45edba | 204 | %attr(755,root,root) %{_bindir}/obrms |
4afabe56 JB |
205 | %attr(755,root,root) %{_bindir}/obrotamer |
206 | %attr(755,root,root) %{_bindir}/obrotate | |
207 | %attr(755,root,root) %{_bindir}/obspectrophore | |
b6a15389 JR |
208 | %attr(755,root,root) %{_bindir}/obsym |
209 | %attr(755,root,root) %{_bindir}/obtautomer | |
210 | %attr(755,root,root) %{_bindir}/obthermo | |
4afabe56 | 211 | %attr(755,root,root) %{_bindir}/roundtrip |
9098769f | 212 | %attr(755,root,root) %{_libdir}/libopenbabel.so.*.*.* |
06c68e42 | 213 | %attr(755,root,root) %ghost %{_libdir}/libopenbabel.so.5 |
e3204b8e | 214 | %dir %{_libdir}/openbabel |
4afabe56 JB |
215 | %dir %{_libdir}/openbabel/%{version} |
216 | %attr(755,root,root) %{_libdir}/openbabel/%{version}/*.so | |
9098769f | 217 | %{_datadir}/openbabel |
4afabe56 | 218 | %{_mandir}/man1/babel.1* |
674189f4 | 219 | %{_mandir}/man1/obabel.1* |
4afabe56 JB |
220 | %{_mandir}/man1/obchiral.1* |
221 | %{_mandir}/man1/obconformer.1* | |
222 | %{_mandir}/man1/obenergy.1* | |
223 | %{_mandir}/man1/obfit.1* | |
224 | %{_mandir}/man1/obgen.1* | |
225 | %{_mandir}/man1/obgrep.1* | |
226 | %{_mandir}/man1/obminimize.1* | |
227 | %{_mandir}/man1/obprobe.1* | |
228 | %{_mandir}/man1/obprop.1* | |
229 | %{_mandir}/man1/obrotamer.1* | |
230 | %{_mandir}/man1/obrotate.1* | |
0f986b5a | 231 | %{_mandir}/man1/obspectrophore.1* |
4afabe56 | 232 | %{_mandir}/man1/roundtrip.1* |
a0f4d9b2 PG |
233 | |
234 | %files devel | |
235 | %defattr(644,root,root,755) | |
7de8135f | 236 | %attr(755,root,root) %{_libdir}/libopenbabel.so |
057245c1 | 237 | %{_includedir}/openbabel-2.0 |
4afabe56 | 238 | %{_pkgconfigdir}/openbabel-2.0.pc |
674189f4 | 239 | %{_libdir}/cmake/openbabel2 |
7de8135f | 240 | |
da41280c JB |
241 | %files gui |
242 | %defattr(644,root,root,755) | |
674189f4 | 243 | %attr(755,root,root) %{_bindir}/obgui |
0f986b5a | 244 | %{_mandir}/man1/obgui.1* |
da41280c | 245 | |
bb45edba JB |
246 | %if %{with java} |
247 | %files -n java-openbabel | |
248 | %defattr(644,root,root,755) | |
249 | %attr(755,root,root) %{_libdir}/libopenbabel_java.so | |
250 | %{_javadir}/openbabel.jar | |
251 | %endif | |
252 | ||
4afabe56 | 253 | %files -n perl-Chemistry-OpenBabel |
8945cb5d | 254 | %defattr(644,root,root,755) |
4afabe56 JB |
255 | %{perl_vendorarch}/Chemistry/OpenBabel.pm |
256 | %dir %{perl_vendorarch}/auto/Chemistry/OpenBabel | |
4afabe56 | 257 | %attr(755,root,root) %{perl_vendorarch}/auto/Chemistry/OpenBabel/OpenBabel.so |
f3fb0901 JB |
258 | |
259 | %files -n python-openbabel | |
260 | %defattr(644,root,root,755) | |
261 | %attr(755,root,root) %{py_sitedir}/_openbabel.so | |
262 | %{py_sitedir}/openbabel.py[co] | |
b745b2cd | 263 | %{py_sitedir}/pybel.py[co] |
b6a15389 | 264 | #%{py_sitedir}/openbabel-1.7-py*.egg-info |
674189f4 JB |
265 | |
266 | %files -n ruby-openbabel | |
267 | %defattr(644,root,root,755) | |
20f7e0a0 | 268 | %attr(755,root,root) %{ruby_vendorarchdir}/openbabel.so |