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