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