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