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