]>
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 |
c50a8762 | 13 | Release: 8 |
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 |
932da6d4 | 26 | URL: http://openbabel.org/ |
674189f4 | 27 | BuildRequires: cairo-devel |
eebeb7a7 | 28 | BuildRequires: cmake >= 2.6.0 |
bb45edba | 29 | BuildRequires: eigen3 >= 3 |
61ea2b64 | 30 | BuildRequires: inchi-devel >= 1.0.3 |
bb45edba | 31 | %{?with_java:BuildRequires: jdk} |
7de8135f | 32 | BuildRequires: libstdc++-devel |
e5243e3e | 33 | BuildRequires: libxml2-devel >= 2.6.5 |
bb45edba | 34 | %{?with_mono:BuildRequires: mono-csharp} |
4afabe56 | 35 | BuildRequires: perl-devel |
f3fb0901 JB |
36 | BuildRequires: rpm-perlprov |
37 | BuildRequires: rpm-pythonprov | |
917a269d | 38 | BuildRequires: rpmbuild(macros) >= 1.577 |
674189f4 | 39 | BuildRequires: ruby-devel |
bb45edba | 40 | BuildRequires: swig >= 2.0 |
3a0e7d20 | 41 | BuildRequires: wxGTK2-unicode-devel |
e5243e3e | 42 | BuildRequires: zlib-devel |
8cdbb1ee | 43 | Requires: inchi-libs >= 1.0.3 |
a5af8661 PG |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
45 | ||
a5af8661 PG |
46 | %description |
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 | |
50 | chemistry. | |
51 | ||
3796afb4 JR |
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 | |
a92c668a JB |
56 | i chemii obliczeniowej. |
57 | ||
a0f4d9b2 PG |
58 | %package devel |
59 | Summary: Header files for OpenBabel | |
1d4e449f | 60 | Summary(pl.UTF-8): Pliki nagłówkowe dla OpenBabel |
0424b5cd | 61 | Group: Development/Libraries |
bf4a610f | 62 | Requires: %{name} = %{version}-%{release} |
4e28c439 | 63 | Requires: libstdc++-devel |
e5243e3e | 64 | Requires: zlib-devel |
4afabe56 | 65 | Obsoletes: openbabel-static |
a0f4d9b2 PG |
66 | |
67 | %description devel | |
68 | Header files for OpenBabel. | |
69 | ||
3796afb4 JR |
70 | %description devel -l pl.UTF-8 |
71 | Pliki nagłówkowe dla OpenBabel. | |
a0f4d9b2 | 72 | |
da41280c JB |
73 | %package gui |
74 | Summary: OpenBabel GUI | |
75 | Summary(pl.UTF-8): Graficzny interfejs użytkownika OpenBabel | |
76 | Group: X11/Applications/Science | |
77 | Requires: %{name} = %{version}-%{release} | |
78 | ||
79 | %description gui | |
80 | Graphical User Interface for OpenBabel. | |
81 | ||
82 | %description gui -l pl.UTF-8 | |
83 | Graficzny interfejs użytkownika OpenBabel. | |
84 | ||
bb45edba JB |
85 | %package -n java-openbabel |
86 | Summary: Java binding for OpenBabel | |
87 | Summary(pl.UTF-8): Wiązanie Javy do biblioteki OpenBabel | |
88 | Group: Libraries/Java | |
89 | ||
90 | %description -n java-openbabel | |
91 | Java binding for OpenBabel. | |
92 | ||
93 | %description -n java-openbabel -l pl.UTF-8 | |
94 | Wiązanie Javy do biblioteki OpenBabel. | |
95 | ||
66b3f4a0 JB |
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} | |
101 | ||
102 | %description -n perl-Chemistry-OpenBabel | |
103 | Perl binding for OpenBabel. | |
104 | ||
105 | %description -n perl-Chemistry-OpenBabel -l pl.UTF-8 | |
106 | Wiązanie Perla do biblioteki OpenBabel. | |
107 | ||
f3fb0901 JB |
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} | |
113 | ||
114 | %description -n python-openbabel | |
115 | Python binding for OpenBabel. | |
116 | ||
117 | %description -n python-openbabel -l pl.UTF-8 | |
118 | Wiązanie Pythona do biblioteki OpenBabel. | |
119 | ||
674189f4 JB |
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} | |
125 | ||
126 | %description -n ruby-openbabel | |
127 | Ruby binding for OpenBabel. | |
128 | ||
129 | %description -n ruby-openbabel -l pl.UTF-8 | |
130 | Wiązanie języka Ruby do biblioteki OpenBabel. | |
131 | ||
a5af8661 | 132 | %prep |
932da6d4 | 133 | %setup -q -n %{name}-%{gitver} |
4afabe56 | 134 | %patch0 -p1 |
20f7e0a0 | 135 | %patch1 -p1 |
0f986b5a | 136 | %patch2 -p1 |
b6a15389 | 137 | %patch3 -p1 |
5bcb70dc WF |
138 | %patch4 -p1 |
139 | %patch5 -p1 | |
02c53f12 | 140 | %patch6 -p1 |
a5af8661 PG |
141 | |
142 | %build | |
4afabe56 | 143 | %cmake . \ |
8cdbb1ee JB |
144 | -DBIN_INSTALL_DIR=%{_bindir} \ |
145 | -DLIB_INSTALL_DIR=%{_lib} \ | |
bb45edba | 146 | %{?with_mono:-DCSHARP_BINDINGS=ON} \ |
da41280c | 147 | -DCSHARP_EXECUTABLE=/usr/bin/mcs \ |
f3fb0901 | 148 | -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \ |
4afabe56 | 149 | -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \ |
bb45edba | 150 | %{?with_java:-DJAVA_BINDINGS=ON} \ |
674189f4 | 151 | -DOBPERL_INSTALLDIRS="vendor" \ |
bb45edba JB |
152 | -DPERL_BINDINGS=ON \ |
153 | -DPYTHON_BINDINGS=ON \ | |
154 | -DRUBY_BINDINGS=ON \ | |
b6a15389 | 155 | -DRUN_SWIG=ON \ |
8cdbb1ee | 156 | -DOPENBABEL_USE_SYSTEM_INCHI=ON \ |
b6a15389 JR |
157 | -DwxWidgets_CONFIG_EXECUTABLE=%{_bindir}/wx-gtk2-unicode-config \ |
158 | -DPERLLIB_INSTALL_DIR=%{perl_vendorarch} \ | |
159 | -DRUBYLIB_INSTALL_DIR=%{ruby_vendorarchdir} | |
a5af8661 | 160 | %{__make} |
a5af8661 PG |
161 | |
162 | %install | |
163 | rm -rf $RPM_BUILD_ROOT | |
5bcb70dc | 164 | install -d $RPM_BUILD_ROOT%{py_sitedir} |
a5af8661 PG |
165 | |
166 | %{__make} install \ | |
20f7e0a0 | 167 | RUBYARCHDIR=$RPM_BUILD_ROOT%{ruby_vendorarchdir} \ |
a5af8661 PG |
168 | DESTDIR=$RPM_BUILD_ROOT |
169 | ||
0f986b5a JR |
170 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} |
171 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
f3fb0901 JB |
172 | %py_postclean |
173 | ||
bb45edba JB |
174 | %if %{with java} |
175 | install -d $RPM_BUILD_ROOT%{_javadir} | |
176 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/*.jar $RPM_BUILD_ROOT%{_javadir} | |
177 | %endif | |
178 | ||
a5af8661 PG |
179 | %clean |
180 | rm -rf $RPM_BUILD_ROOT | |
181 | ||
7de8135f JB |
182 | %post -p /sbin/ldconfig |
183 | %postun -p /sbin/ldconfig | |
184 | ||
a5af8661 PG |
185 | %files |
186 | %defattr(644,root,root,755) | |
b6a15389 | 187 | %doc AUTHORS README.md THANKS doc/*.html |
4afabe56 JB |
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 | |
b6a15389 | 192 | %attr(755,root,root) %{_bindir}/obdistgen |
4afabe56 JB |
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 | |
bb45edba | 200 | %attr(755,root,root) %{_bindir}/obrms |
4afabe56 JB |
201 | %attr(755,root,root) %{_bindir}/obrotamer |
202 | %attr(755,root,root) %{_bindir}/obrotate | |
203 | %attr(755,root,root) %{_bindir}/obspectrophore | |
b6a15389 JR |
204 | %attr(755,root,root) %{_bindir}/obsym |
205 | %attr(755,root,root) %{_bindir}/obtautomer | |
206 | %attr(755,root,root) %{_bindir}/obthermo | |
4afabe56 | 207 | %attr(755,root,root) %{_bindir}/roundtrip |
9098769f | 208 | %attr(755,root,root) %{_libdir}/libopenbabel.so.*.*.* |
06c68e42 | 209 | %attr(755,root,root) %ghost %{_libdir}/libopenbabel.so.5 |
e3204b8e | 210 | %dir %{_libdir}/openbabel |
4afabe56 JB |
211 | %dir %{_libdir}/openbabel/%{version} |
212 | %attr(755,root,root) %{_libdir}/openbabel/%{version}/*.so | |
9098769f | 213 | %{_datadir}/openbabel |
4afabe56 | 214 | %{_mandir}/man1/babel.1* |
674189f4 | 215 | %{_mandir}/man1/obabel.1* |
4afabe56 JB |
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* | |
0f986b5a | 227 | %{_mandir}/man1/obspectrophore.1* |
4afabe56 | 228 | %{_mandir}/man1/roundtrip.1* |
a0f4d9b2 PG |
229 | |
230 | %files devel | |
231 | %defattr(644,root,root,755) | |
7de8135f | 232 | %attr(755,root,root) %{_libdir}/libopenbabel.so |
057245c1 | 233 | %{_includedir}/openbabel-2.0 |
4afabe56 | 234 | %{_pkgconfigdir}/openbabel-2.0.pc |
674189f4 | 235 | %{_libdir}/cmake/openbabel2 |
7de8135f | 236 | |
da41280c JB |
237 | %files gui |
238 | %defattr(644,root,root,755) | |
674189f4 | 239 | %attr(755,root,root) %{_bindir}/obgui |
0f986b5a | 240 | %{_mandir}/man1/obgui.1* |
da41280c | 241 | |
bb45edba JB |
242 | %if %{with java} |
243 | %files -n java-openbabel | |
244 | %defattr(644,root,root,755) | |
245 | %attr(755,root,root) %{_libdir}/libopenbabel_java.so | |
246 | %{_javadir}/openbabel.jar | |
247 | %endif | |
248 | ||
4afabe56 | 249 | %files -n perl-Chemistry-OpenBabel |
8945cb5d | 250 | %defattr(644,root,root,755) |
4afabe56 JB |
251 | %{perl_vendorarch}/Chemistry/OpenBabel.pm |
252 | %dir %{perl_vendorarch}/auto/Chemistry/OpenBabel | |
4afabe56 | 253 | %attr(755,root,root) %{perl_vendorarch}/auto/Chemistry/OpenBabel/OpenBabel.so |
f3fb0901 JB |
254 | |
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] | |
b745b2cd | 259 | %{py_sitedir}/pybel.py[co] |
b6a15389 | 260 | #%{py_sitedir}/openbabel-1.7-py*.egg-info |
674189f4 JB |
261 | |
262 | %files -n ruby-openbabel | |
263 | %defattr(644,root,root,755) | |
20f7e0a0 | 264 | %attr(755,root,root) %{ruby_vendorarchdir}/openbabel.so |