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