]> git.pld-linux.org Git - packages/openbabel.git/blob - openbabel.spec
- disable java bindings
[packages/openbabel.git] / openbabel.spec
1 # TODO:
2 # - install+package csharp bindings
3 #
4 # Conditional build:
5 %bcond_with     java    # Java/JNI bindings
6 %bcond_with     mono    # .NET/C# bindings
7 #
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
11 Name:           openbabel
12 Version:        2.4.1
13 Release:        6
14 License:        GPL v2
15 Group:          Libraries
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
23 Patch4:         gcc6.patch
24 Patch5:         plugindir.patch
25 Patch6:         cmake.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)
45
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
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.
57
58 %package devel
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
64 Requires:       zlib-devel
65 Obsoletes:      openbabel-static
66
67 %description devel
68 Header files for OpenBabel.
69
70 %description devel -l pl.UTF-8
71 Pliki nagłówkowe dla OpenBabel.
72
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
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
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
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
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
132 %prep
133 %setup -q -n %{name}-%{gitver}
134 %patch0 -p1
135 %patch1 -p1
136 %patch2 -p1
137 %patch3 -p1
138 %patch4 -p1
139 %patch5 -p1
140 %patch6 -p1
141
142 %build
143 %cmake . \
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" \
152         -DPERL_BINDINGS=ON \
153         -DPYTHON_BINDINGS=ON \
154         -DRUBY_BINDINGS=ON \
155         -DRUN_SWIG=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}
160 %{__make}
161
162 %install
163 rm -rf $RPM_BUILD_ROOT
164 install -d $RPM_BUILD_ROOT%{py_sitedir}
165
166 %{__make} install \
167         RUBYARCHDIR=$RPM_BUILD_ROOT%{ruby_vendorarchdir} \
168         DESTDIR=$RPM_BUILD_ROOT
169
170 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
171 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
172 %py_postclean
173
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
179 %clean
180 rm -rf $RPM_BUILD_ROOT
181
182 %post   -p /sbin/ldconfig
183 %postun -p /sbin/ldconfig
184
185 %files
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*
229
230 %files devel
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
236
237 %files gui
238 %defattr(644,root,root,755)
239 %attr(755,root,root) %{_bindir}/obgui
240 %{_mandir}/man1/obgui.1*
241
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
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
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]
259 %{py_sitedir}/pybel.py[co]
260 #%{py_sitedir}/openbabel-1.7-py*.egg-info
261
262 %files -n ruby-openbabel
263 %defattr(644,root,root,755)
264 %attr(755,root,root) %{ruby_vendorarchdir}/openbabel.so
This page took 0.066937 seconds and 3 git commands to generate.