2 # - install+package csharp bindings
5 %bcond_with java # Java/JNI bindings
6 %bcond_with mono # .NET/C# bindings
8 %define gitver openbabel-2-4-1
9 Summary: A cross-platform chemistry program and library designed to convert file formats
10 Summary(pl.UTF-8): Międzyplatformowy program chemiczny i biblioteka do konwersji formatów plików
16 #Source0Download: https://github.com/openbabel/openbabel/releases
17 Source0: https://github.com/openbabel/openbabel/archive/%{gitver}/%{name}-%{version}.tar.gz
18 # Source0-md5: c0e0aefeef0f9f2bb2c78109d65c30a5
19 Patch0: %{name}-prefix.patch
20 Patch1: perl-x32.patch
21 Patch2: perl-install.patch
22 Patch3: ruby-install.patch
24 Patch5: plugindir.patch
26 URL: http://openbabel.org/
27 BuildRequires: cairo-devel
28 BuildRequires: cmake >= 2.6.0
29 BuildRequires: eigen3 >= 3
30 BuildRequires: inchi-devel >= 1.0.3
31 %{?with_java:BuildRequires: jdk}
32 BuildRequires: libstdc++-devel
33 BuildRequires: libxml2-devel >= 2.6.5
34 %{?with_mono:BuildRequires: mono-csharp}
35 BuildRequires: perl-devel
36 BuildRequires: rpm-perlprov
37 BuildRequires: rpm-pythonprov
38 BuildRequires: rpmbuild(macros) >= 1.577
39 BuildRequires: ruby-devel
40 BuildRequires: swig >= 2.0
41 BuildRequires: wxGTK2-unicode-devel
42 BuildRequires: zlib-devel
43 Requires: inchi-libs >= 1.0.3
44 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 Open Babel is a project designed to pick up where Babel left off, as a
48 cross-platform program and library designed to interconvert between
49 many file formats used in molecular modeling and computational
52 %description -l pl.UTF-8
53 Open Babel to projekt mający pozbierać to, co zostało po zaniechaniu
54 projektu Babel, jako międzyplatformowy program i biblioteka służące do
55 konwersji między wieloma formatami używanymi w modelowaniu cząsteczek
56 i chemii obliczeniowej.
59 Summary: Header files for OpenBabel
60 Summary(pl.UTF-8): Pliki nagłówkowe dla OpenBabel
61 Group: Development/Libraries
62 Requires: %{name} = %{version}-%{release}
63 Requires: libstdc++-devel
65 Obsoletes: openbabel-static
68 Header files for OpenBabel.
70 %description devel -l pl.UTF-8
71 Pliki nagłówkowe dla OpenBabel.
74 Summary: OpenBabel GUI
75 Summary(pl.UTF-8): Graficzny interfejs użytkownika OpenBabel
76 Group: X11/Applications/Science
77 Requires: %{name} = %{version}-%{release}
80 Graphical User Interface for OpenBabel.
82 %description gui -l pl.UTF-8
83 Graficzny interfejs użytkownika OpenBabel.
85 %package -n java-openbabel
86 Summary: Java binding for OpenBabel
87 Summary(pl.UTF-8): Wiązanie Javy do biblioteki OpenBabel
90 %description -n java-openbabel
91 Java binding for OpenBabel.
93 %description -n java-openbabel -l pl.UTF-8
94 Wiązanie Javy do biblioteki OpenBabel.
96 %package -n perl-Chemistry-OpenBabel
97 Summary: Perl binding for OpenBabel
98 Summary(pl.UTF-8): Wiązanie Perla do biblioteki OpenBabel
99 Group: Development/Languages/Perl
100 Requires: %{name} = %{version}-%{release}
102 %description -n perl-Chemistry-OpenBabel
103 Perl binding for OpenBabel.
105 %description -n perl-Chemistry-OpenBabel -l pl.UTF-8
106 Wiązanie Perla do biblioteki OpenBabel.
108 %package -n python-openbabel
109 Summary: Python binding for OpenBabel
110 Summary(pl.UTF-8): Wiązanie Pythona do biblioteki OpenBabel
111 Group: Libraries/Python
112 Requires: %{name} = %{version}-%{release}
114 %description -n python-openbabel
115 Python binding for OpenBabel.
117 %description -n python-openbabel -l pl.UTF-8
118 Wiązanie Pythona do biblioteki OpenBabel.
120 %package -n ruby-openbabel
121 Summary: Ruby binding for OpenBabel
122 Summary(pl.UTF-8): Wiązanie języka Ruby do biblioteki OpenBabel
123 Group: Development/Languages
124 Requires: %{name} = %{version}-%{release}
126 %description -n ruby-openbabel
127 Ruby binding for OpenBabel.
129 %description -n ruby-openbabel -l pl.UTF-8
130 Wiązanie języka Ruby do biblioteki OpenBabel.
133 %setup -q -n %{name}-%{gitver}
144 -DBIN_INSTALL_DIR=%{_bindir} \
145 -DLIB_INSTALL_DIR=%{_lib} \
146 %{?with_mono:-DCSHARP_BINDINGS=ON} \
147 -DCSHARP_EXECUTABLE=/usr/bin/mcs \
148 -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
149 -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
150 %{?with_java:-DJAVA_BINDINGS=ON} \
151 -DOBPERL_INSTALLDIRS="vendor" \
153 -DPYTHON_BINDINGS=ON \
156 -DOPENBABEL_USE_SYSTEM_INCHI=ON \
157 -DwxWidgets_CONFIG_EXECUTABLE=%{_bindir}/wx-gtk2-unicode-config \
158 -DPERLLIB_INSTALL_DIR=%{perl_vendorarch} \
159 -DRUBYLIB_INSTALL_DIR=%{ruby_vendorarchdir}
163 rm -rf $RPM_BUILD_ROOT
164 install -d $RPM_BUILD_ROOT%{py_sitedir}
167 RUBYARCHDIR=$RPM_BUILD_ROOT%{ruby_vendorarchdir} \
168 DESTDIR=$RPM_BUILD_ROOT
170 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
171 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
175 install -d $RPM_BUILD_ROOT%{_javadir}
176 %{__mv} $RPM_BUILD_ROOT%{_libdir}/*.jar $RPM_BUILD_ROOT%{_javadir}
180 rm -rf $RPM_BUILD_ROOT
182 %post -p /sbin/ldconfig
183 %postun -p /sbin/ldconfig
186 %defattr(644,root,root,755)
187 %doc AUTHORS README.md THANKS doc/*.html
188 %attr(755,root,root) %{_bindir}/babel
189 %attr(755,root,root) %{_bindir}/obabel
190 %attr(755,root,root) %{_bindir}/obchiral
191 %attr(755,root,root) %{_bindir}/obconformer
192 %attr(755,root,root) %{_bindir}/obdistgen
193 %attr(755,root,root) %{_bindir}/obenergy
194 %attr(755,root,root) %{_bindir}/obfit
195 %attr(755,root,root) %{_bindir}/obgen
196 %attr(755,root,root) %{_bindir}/obgrep
197 %attr(755,root,root) %{_bindir}/obminimize
198 %attr(755,root,root) %{_bindir}/obprobe
199 %attr(755,root,root) %{_bindir}/obprop
200 %attr(755,root,root) %{_bindir}/obrms
201 %attr(755,root,root) %{_bindir}/obrotamer
202 %attr(755,root,root) %{_bindir}/obrotate
203 %attr(755,root,root) %{_bindir}/obspectrophore
204 %attr(755,root,root) %{_bindir}/obsym
205 %attr(755,root,root) %{_bindir}/obtautomer
206 %attr(755,root,root) %{_bindir}/obthermo
207 %attr(755,root,root) %{_bindir}/roundtrip
208 %attr(755,root,root) %{_libdir}/libopenbabel.so.*.*.*
209 %attr(755,root,root) %ghost %{_libdir}/libopenbabel.so.5
210 %dir %{_libdir}/openbabel
211 %dir %{_libdir}/openbabel/%{version}
212 %attr(755,root,root) %{_libdir}/openbabel/%{version}/*.so
213 %{_datadir}/openbabel
214 %{_mandir}/man1/babel.1*
215 %{_mandir}/man1/obabel.1*
216 %{_mandir}/man1/obchiral.1*
217 %{_mandir}/man1/obconformer.1*
218 %{_mandir}/man1/obenergy.1*
219 %{_mandir}/man1/obfit.1*
220 %{_mandir}/man1/obgen.1*
221 %{_mandir}/man1/obgrep.1*
222 %{_mandir}/man1/obminimize.1*
223 %{_mandir}/man1/obprobe.1*
224 %{_mandir}/man1/obprop.1*
225 %{_mandir}/man1/obrotamer.1*
226 %{_mandir}/man1/obrotate.1*
227 %{_mandir}/man1/obspectrophore.1*
228 %{_mandir}/man1/roundtrip.1*
231 %defattr(644,root,root,755)
232 %attr(755,root,root) %{_libdir}/libopenbabel.so
233 %{_includedir}/openbabel-2.0
234 %{_pkgconfigdir}/openbabel-2.0.pc
235 %{_libdir}/cmake/openbabel2
238 %defattr(644,root,root,755)
239 %attr(755,root,root) %{_bindir}/obgui
240 %{_mandir}/man1/obgui.1*
243 %files -n java-openbabel
244 %defattr(644,root,root,755)
245 %attr(755,root,root) %{_libdir}/libopenbabel_java.so
246 %{_javadir}/openbabel.jar
249 %files -n perl-Chemistry-OpenBabel
250 %defattr(644,root,root,755)
251 %{perl_vendorarch}/Chemistry/OpenBabel.pm
252 %dir %{perl_vendorarch}/auto/Chemistry/OpenBabel
253 %attr(755,root,root) %{perl_vendorarch}/auto/Chemistry/OpenBabel/OpenBabel.so
255 %files -n python-openbabel
256 %defattr(644,root,root,755)
257 %attr(755,root,root) %{py_sitedir}/_openbabel.so
258 %{py_sitedir}/openbabel.py[co]
259 %{py_sitedir}/pybel.py[co]
260 #%{py_sitedir}/openbabel-1.7-py*.egg-info
262 %files -n ruby-openbabel
263 %defattr(644,root,root,755)
264 %attr(755,root,root) %{ruby_vendorarchdir}/openbabel.so