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
27 URL: http://openbabel.org/
28 BuildRequires: cairo-devel
29 BuildRequires: cmake >= 2.6.0
30 BuildRequires: eigen3 >= 3
31 BuildRequires: inchi-devel >= 1.0.3
32 %{?with_java:BuildRequires: jdk}
33 BuildRequires: libstdc++-devel
34 BuildRequires: libxml2-devel >= 1:2.6.5
35 %{?with_mono:BuildRequires: mono-csharp}
36 BuildRequires: perl-devel
38 BuildRequires: python-modules
39 BuildRequires: rpm-perlprov
40 BuildRequires: rpm-pythonprov
41 BuildRequires: rpmbuild(macros) >= 1.605
42 BuildRequires: ruby-devel
43 BuildRequires: swig >= 2.0
44 BuildRequires: wxGTK3-unicode-devel
45 BuildRequires: zlib-devel
46 Requires: inchi-libs >= 1.0.3
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
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
59 i chemii obliczeniowej.
62 Summary: Header files for OpenBabel
63 Summary(pl.UTF-8): Pliki nagłówkowe dla OpenBabel
64 Group: Development/Libraries
65 Requires: %{name} = %{version}-%{release}
66 Requires: libstdc++-devel
68 Obsoletes: openbabel-static
71 Header files for OpenBabel.
73 %description devel -l pl.UTF-8
74 Pliki nagłówkowe dla OpenBabel.
77 Summary: OpenBabel GUI
78 Summary(pl.UTF-8): Graficzny interfejs użytkownika OpenBabel
79 Group: X11/Applications/Science
80 Requires: %{name} = %{version}-%{release}
83 Graphical User Interface for OpenBabel.
85 %description gui -l pl.UTF-8
86 Graficzny interfejs użytkownika OpenBabel.
88 %package -n java-openbabel
89 Summary: Java binding for OpenBabel
90 Summary(pl.UTF-8): Wiązanie Javy do biblioteki OpenBabel
93 %description -n java-openbabel
94 Java binding for OpenBabel.
96 %description -n java-openbabel -l pl.UTF-8
97 Wiązanie Javy do biblioteki OpenBabel.
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}
105 %description -n perl-Chemistry-OpenBabel
106 Perl binding for OpenBabel.
108 %description -n perl-Chemistry-OpenBabel -l pl.UTF-8
109 Wiązanie Perla do biblioteki OpenBabel.
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}
117 %description -n python-openbabel
118 Python binding for OpenBabel.
120 %description -n python-openbabel -l pl.UTF-8
121 Wiązanie Pythona do biblioteki OpenBabel.
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}
129 %description -n ruby-openbabel
130 Ruby binding for OpenBabel.
132 %description -n ruby-openbabel -l pl.UTF-8
133 Wiązanie języka Ruby do biblioteki OpenBabel.
136 %setup -q -n %{name}-%{gitver}
148 -DBIN_INSTALL_DIR=%{_bindir} \
149 -DLIB_INSTALL_DIR=%{_lib} \
150 %{?with_mono:-DCSHARP_BINDINGS=ON} \
151 -DCSHARP_EXECUTABLE=/usr/bin/mcs \
152 -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \
153 -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \
154 %{?with_java:-DJAVA_BINDINGS=ON} \
155 -DOBPERL_INSTALLDIRS="vendor" \
157 -DPYTHON_BINDINGS=ON \
160 -DOPENBABEL_USE_SYSTEM_INCHI=ON \
161 -DwxWidgets_CONFIG_EXECUTABLE=%{_bindir}/wx-gtk3-unicode-config \
162 -DPERLLIB_INSTALL_DIR=%{perl_vendorarch} \
163 -DRUBYLIB_INSTALL_DIR=%{ruby_vendorarchdir}
167 rm -rf $RPM_BUILD_ROOT
168 install -d $RPM_BUILD_ROOT%{py_sitedir}
171 RUBYARCHDIR=$RPM_BUILD_ROOT%{ruby_vendorarchdir} \
172 DESTDIR=$RPM_BUILD_ROOT
174 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
175 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
179 install -d $RPM_BUILD_ROOT%{_javadir}
180 %{__mv} $RPM_BUILD_ROOT%{_libdir}/*.jar $RPM_BUILD_ROOT%{_javadir}
184 rm -rf $RPM_BUILD_ROOT
186 %post -p /sbin/ldconfig
187 %postun -p /sbin/ldconfig
190 %defattr(644,root,root,755)
191 %doc AUTHORS README.md THANKS doc/*.html
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
196 %attr(755,root,root) %{_bindir}/obdistgen
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
204 %attr(755,root,root) %{_bindir}/obrms
205 %attr(755,root,root) %{_bindir}/obrotamer
206 %attr(755,root,root) %{_bindir}/obrotate
207 %attr(755,root,root) %{_bindir}/obspectrophore
208 %attr(755,root,root) %{_bindir}/obsym
209 %attr(755,root,root) %{_bindir}/obtautomer
210 %attr(755,root,root) %{_bindir}/obthermo
211 %attr(755,root,root) %{_bindir}/roundtrip
212 %attr(755,root,root) %{_libdir}/libopenbabel.so.*.*.*
213 %attr(755,root,root) %ghost %{_libdir}/libopenbabel.so.5
214 %dir %{_libdir}/openbabel
215 %dir %{_libdir}/openbabel/%{version}
216 %attr(755,root,root) %{_libdir}/openbabel/%{version}/*.so
217 %{_datadir}/openbabel
218 %{_mandir}/man1/babel.1*
219 %{_mandir}/man1/obabel.1*
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*
231 %{_mandir}/man1/obspectrophore.1*
232 %{_mandir}/man1/roundtrip.1*
235 %defattr(644,root,root,755)
236 %attr(755,root,root) %{_libdir}/libopenbabel.so
237 %{_includedir}/openbabel-2.0
238 %{_pkgconfigdir}/openbabel-2.0.pc
239 %{_libdir}/cmake/openbabel2
242 %defattr(644,root,root,755)
243 %attr(755,root,root) %{_bindir}/obgui
244 %{_mandir}/man1/obgui.1*
247 %files -n java-openbabel
248 %defattr(644,root,root,755)
249 %attr(755,root,root) %{_libdir}/libopenbabel_java.so
250 %{_javadir}/openbabel.jar
253 %files -n perl-Chemistry-OpenBabel
254 %defattr(644,root,root,755)
255 %{perl_vendorarch}/Chemistry/OpenBabel.pm
256 %dir %{perl_vendorarch}/auto/Chemistry/OpenBabel
257 %attr(755,root,root) %{perl_vendorarch}/auto/Chemistry/OpenBabel/OpenBabel.so
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]
263 %{py_sitedir}/pybel.py[co]
264 #%{py_sitedir}/openbabel-1.7-py*.egg-info
266 %files -n ruby-openbabel
267 %defattr(644,root,root,755)
268 %attr(755,root,root) %{ruby_vendorarchdir}/openbabel.so