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