swt2c / rpms / openbabel

Forked from rpms/openbabel 5 years ago
Clone
c82b495
%define perl_vendorarch %(eval "`perl -V:installvendorarch`"; echo $installvendorarch)
c82b495
%define perl_archlib %(eval "`perl -V:archlib`"; echo $archlib)
c82b495
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
c82b495
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
971a7a7
%define ruby_sitearch %(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]')
971a7a7
c0d8ace
%define beta_ver %{nil}
c0d8ace
%define beta_str %{nil}
c82b495
c82b495
Name: openbabel
c0d8ace
Version: 2.2.3
9c6b4ca
Release: 2%{beta_ver}%{?dist}
c82b495
Summary: Chemistry software file format converter
4a3e007
License: GPLv2
c82b495
Group: Applications/File
b8204de
URL: http://openbabel.org/
c0d8ace
Source: http://downloads.sourceforge.net/sourceforge/openbabel/%{name}-%{version}%{beta_str}.tar.gz
971a7a7
Patch1: %{name}-rpm.patch
c0d8ace
Patch3: %{name}-inchi.patch
c82b495
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
44a003b
BuildRequires: inchi-devel
c82b495
BuildRequires: libtool
c82b495
BuildRequires: libxml2-devel
4a3e007
BuildRequires: perl(ExtUtils::MakeMaker)
18facae
BuildRequires: python
18facae
BuildRequires: python-devel
971a7a7
BuildRequires: ruby
971a7a7
BuildRequires: ruby-devel
971a7a7
BuildRequires: swig
ab3ac66
#TODO: enable when GUI is functional
ab3ac66
#BuildRequires: wxGTK-devel
c82b495
BuildRequires: zlib-devel
c82b495
c82b495
%description
c82b495
Open Babel is a free, open-source version of the Babel chemistry file
c82b495
translation program. Open Babel is a project designed to pick up where
c82b495
Babel left off, as a cross-platform program and library designed to
c82b495
interconvert between many file formats used in molecular modeling,
c82b495
computational chemistry, and many related areas.
c82b495
c82b495
Open Babel includes two components, a command-line utility and a C++
c82b495
library. The command-line utility is intended to be used as a replacement
c82b495
for the original babel program, to translate between various chemical file
c82b495
formats. The C++ library includes all of the file-translation code as well
c82b495
as a wide variety of utilities to foster development of other open source
c82b495
scientific software. 
c82b495
c82b495
%package devel
c82b495
Summary: Development tools for programs which will use the Open Babel library
c82b495
Group: Development/Libraries
c82b495
Requires: %{name} = %{version}-%{release}
c82b495
Requires: pkgconfig
c82b495
c82b495
%description devel
c82b495
The %{name}-devel package includes the header files and libraries
c82b495
necessary for developing programs using the Open Babel library.
c82b495
c82b495
If you are going to develop programs which will use this library
c82b495
you should install %{name}-devel.  You'll also need to have the
c82b495
%{name} package installed.
c82b495
971a7a7
%package -n perl-%{name}
c82b495
Group: System Environment/Libraries
c82b495
Summary: Perl wrapper for the Open Babel library
7ec9e5e
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
971a7a7
Obsoletes: %{name}-perl < 2.2.0
7ec9e5e
Provides: %{name}-perl = %{version}-%{release}
c82b495
971a7a7
%description -n perl-%{name}
c82b495
Perl wrapper for the Open Babel library.
c82b495
971a7a7
%package -n python-%{name}
c82b495
Group: System Environment/Libraries
c82b495
Summary: Python wrapper for the Open Babel library
971a7a7
Obsoletes: %{name}-python < 2.2.0
7ec9e5e
Provides: %{name}-python = %{version}-%{release}
c82b495
971a7a7
%description -n python-%{name}
c82b495
Python wrapper for the Open Babel library.
c82b495
971a7a7
%package -n ruby-%{name}
971a7a7
Summary: Ruby wrapper for the Open Babel library
971a7a7
Group: Development/Libraries
971a7a7
Requires: ruby(abi) = 1.8
971a7a7
Requires: %{name} = %{version}-%{release}
971a7a7
971a7a7
%description -n ruby-%{name}
971a7a7
Ruby wrapper for the Open Babel library.
971a7a7
c82b495
%prep
699f6a0
%setup -q -n %{name}-%{version}%{beta_str}
971a7a7
%patch1 -p1 -b .r
c0d8ace
%patch3 -p1 -b .inchi
c0d8ace
chmod 644 src/formats/mmcifformat.cpp
c82b495
c82b495
%build
b3785c6
autoreconf --force --install
e5a9350
%configure --enable-shared=yes --enable-static=no --disable-inchi --enable-maintainer-mode
c82b495
%{__make} %{?_smp_mflags}
c82b495
c82b495
pushd scripts/perl
c82b495
perl Makefile.PL INSTALLDIRS="vendor"
18facae
%{__make} %{?_smp_mflags} OPTIMIZE="$RPM_OPT_FLAGS"
c82b495
popd
c82b495
c82b495
pushd scripts/python
c82b495
python setup.py build
c82b495
popd
c82b495
971a7a7
pushd scripts/ruby
699f6a0
ruby extconf.rb --with-openbabel-include=../../include --with-openbabel-lib=../../src/.libs
971a7a7
%{__make} %{?_smp_mflags}
971a7a7
popd
971a7a7
c82b495
%install
c82b495
%{__rm} -rf $RPM_BUILD_ROOT
c82b495
c82b495
%{__make} install DESTDIR=$RPM_BUILD_ROOT
c82b495
8913f98
%{__rm} $RPM_BUILD_ROOT%{_libdir}{,/%{name}/%{version}%{beta_ver}}/*.la
8913f98
c82b495
pushd scripts/perl
c82b495
%{__make} install DESTDIR=$RPM_BUILD_ROOT
c82b495
popd
c82b495
%{__rm} -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
c82b495
%{__rm} -f $RPM_BUILD_ROOT%{perl_vendorarch}/*/Chemistry/OpenBabel/{.packlist,OpenBabel.bs}
10244b4
chmod 755 $RPM_BUILD_ROOT%{perl_vendorarch}/*/Chemistry/OpenBabel/OpenBabel.so
18facae
c82b495
pushd scripts/python
18facae
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
c82b495
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
c82b495
popd
7ec9e5e
chmod 755 $RPM_BUILD_ROOT%{python_sitearch}/_openbabel.so
c82b495
971a7a7
pushd scripts/ruby
971a7a7
%{__make} install DESTDIR=$RPM_BUILD_ROOT
971a7a7
popd
971a7a7
c82b495
%clean
c82b495
%{__rm} -rf $RPM_BUILD_ROOT
c82b495
2f8d650
%check
2f8d650
%{__make} check
2f8d650
c82b495
%post -p /sbin/ldconfig
c82b495
c82b495
%postun -p /sbin/ldconfig
c82b495
c82b495
%files
c82b495
%defattr(-,root,root,-)
c82b495
%doc AUTHORS COPYING ChangeLog README THANKS
c82b495
%doc doc/*.html
c82b495
%doc doc/README* doc/babel*.inc doc/dioxin.*
c82b495
%{_bindir}/*
c82b495
%{_mandir}/man1/*
c82b495
%{_datadir}/%{name}
c82b495
%{_libdir}/libopenbabel.so.*
c82b495
%{_libdir}/%{name}
c82b495
c82b495
%files devel
c82b495
%defattr(-,root,root,-)
c82b495
%{_includedir}/%{name}-2.0
c82b495
%{_libdir}/libopenbabel.so
c82b495
%{_libdir}/pkgconfig/*.pc
c82b495
971a7a7
%files -n perl-%{name}
c82b495
%defattr(-,root,root,-)
c82b495
%{perl_vendorarch}/Chemistry/OpenBabel.pm
c82b495
%dir %{perl_vendorarch}/*/Chemistry/OpenBabel
c82b495
%{perl_vendorarch}/*/Chemistry/OpenBabel/OpenBabel.so
c82b495
971a7a7
%files -n python-%{name}
c82b495
%defattr(-,root,root,-)
8913f98
%{python_sitearch}/_openbabel.so
18facae
%{python_sitearch}/openbabel.py*
10244b4
%{python_sitearch}/pybel.py*
cc33a84
%{python_sitearch}/openbabel*.egg-info
c82b495
971a7a7
%files -n ruby-%{name}
971a7a7
%defattr(-, root, root, -)
971a7a7
%{ruby_sitearch}/openbabel.so
971a7a7
c82b495
%changelog
9c6b4ca
* Thu Apr 29 2010 Marcela Maslanova <mmaslano@redhat.com> - 2.2.3-2
9c6b4ca
- Mass rebuild with perl-5.12.0
9c6b4ca
c0d8ace
* Wed Aug 26 2009 Dominik Mierzejewski <rpm@greysector.net> 2.2.3-1
c0d8ace
- updated to 2.2.3
c0d8ace
- dropped obsolete patch
2a0a8b2
- fixed configure to detect external inchi (both pre-1.0.2 and 1.0.2)
2a0a8b2
- re-enabled inchi tests
c0d8ace
74b3a72
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-0.2.b3
74b3a72
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
74b3a72
699f6a0
* Sun Mar 01 2009 Dominik Mierzejewski <rpm@greysector.net> 2.2.1-0.1.b3
699f6a0
- update to 2.2.1 beta3
699f6a0
- drop some obsolete workarounds
699f6a0
f2946a8
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0-3
f2946a8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
f2946a8
8b53d8a
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.2.0-2
8b53d8a
- Rebuild for Python 2.6
8b53d8a
7ec9e5e
* Sun Jul 06 2008 Dominik Mierzejewski <rpm@greysector.net> 2.2.0-1
7ec9e5e
- updated to 2.2.0
b8204de
- new URL
b8204de
- dropped Python binding split patch (broken, reverted upstream)
7ec9e5e
- fixed testsuite and disabled inchi tests temporarily
3cc07e4
- added strict perl version requirements (patch by Paul Howarth, bug #453120)
7ec9e5e
- fixed some rpmlint warnings
7ec9e5e
- merged a sed call into -rpm patch
b8204de
8550af9
* Fri Jun 06 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 2.2.0-0.5.b5
8550af9
- backport upstream patch to split Python binding (should fix #427700 for good)
8550af9
- drop no longer needed ppc64 SWIG/GCC flag hackery
8550af9
16a197a
* Thu May 29 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 2.2.0-0.4.b5
16a197a
- update to 2.2.0 beta5
16a197a
3901d3c
* Fri May 09 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 2.2.0-0.3.b4
354d057
- generate Python binding with -fastdispatch on F9+ ppc64 (#427700)
1344669
- add -mno-sum-in-toc to optflags on F9+ ppc64 (#427700)
f2d13ad
837df1d
* Sun Mar 02 2008 Dominik Mierzejewski <rpm@greysector.net> 2.2.0-0.2.b4
837df1d
- updated to 2.2.0 beta4
837df1d
- enable CML tests again (fixed upstream)
837df1d
971a7a7
* Fri Feb 22 2008 Dominik Mierzejewski <rpm@greysector.net> 2.2.0-0.1.b3
971a7a7
- updated to 2.2.0 beta3
971a7a7
- renamed language bindings subpackages
971a7a7
- added ruby bindings
971a7a7
- fixed ruby buildings build with local shared lib
971a7a7
- disable CML tests (broken upstream)
971a7a7
92e8cea
* Mon Jan 07 2008 Dominik Mierzejewski <rpm@greysector.net> 2.1.1-4
92e8cea
- work around gcc bug: http://gcc.gnu.org/PR34708
92e8cea
10fba4f
* Sun Jan 06 2008 Dominik Mierzejewski <rpm@greysector.net> 2.1.1-3
10fba4f
- fix build with gcc-4.3
cc33a84
- include python egg-info
10fba4f
44a003b
* Wed Nov 28 2007 Dominik Mierzejewski <rpm@greysector.net> 2.1.1-2
44a003b
- build against external inchi
44a003b
4a3e007
* Fri Aug 17 2007 Dominik Mierzejewski <rpm@greysector.net> 2.1.1-1
4a3e007
- updated to 2.1.1
4a3e007
- better work around for testsuite crash
4a3e007
- updated the License tag according to the new guidelines
4a3e007
72f988f
* Tue Apr 17 2007 Dominik Mierzejewski <rpm@greysector.net> 2.1.0-2
72f988f
- work around testsuite crash
72f988f
b95dfd2
* Mon Apr 16 2007 Dominik Mierzejewski <rpm@greysector.net> 2.1.0-1
b95dfd2
- updated to 2.1.0 final
b95dfd2
ab3ac66
* Thu Mar 29 2007 Dominik Mierzejewski <rpm@greysector.net> 2.1.0-0.3.b8
ab3ac66
- updated to beta8
ab3ac66
- dropped upstream'd patch
ab3ac66
2f8d650
* Sun Mar 18 2007 Dominik Mierzejewski <rpm@greysector.net> 2.1.0-0.2.b6
2f8d650
- updated to beta6
2f8d650
- dropped upstream'd patch
2f8d650
- fixed my name in ChangeLog
2f8d650
- copied inchi header for inchi-devel (TODO: make inchi a separate package)
2f8d650
- added %%check
2f8d650
10244b4
* Sun Dec 17 2006 Dominik Mierzejewski <rpm@greysector.net> 2.1.0-0.1.b4
10244b4
- update to 2.1.0b4 to fix building with new python
10244b4
- dropped obsolete patch
10244b4
- ensure proper inchi versioning
10244b4
3966db2
* Tue Oct 03 2006 Dominik Mierzejewski <rpm@greysector.net> 2.0.2-5
3966db2
- rebuilt for unwind info generation, broken in gcc-4.1.1-21
3966db2
18facae
* Wed Sep 20 2006 Dominik Mierzejewski <rpm@greysector.net> 2.0.2-4
18facae
- .pyo files no longer ghosted
18facae
- fix chicken-and-egg problem when building perl and python bindings
18facae
b3785c6
* Tue Aug 29 2006 Dominik Mierzejewski <rpm@greysector.net> 2.0.2-3
b3785c6
- simplified autotools invocation
b3785c6
- mass rebuild
b3785c6
c82b495
* Mon Aug 07 2006 Dominik Mierzejewski <rpm@greysector.net> 2.0.2-2
c82b495
- simplified file lists and permissions
c82b495
- removed weird character from inchi summary and description
c82b495
- added missing pkgconfig Req: for -devel
c82b495
c82b495
* Sat Aug 05 2006 Dominik Mierzejewski <rpm@greysector.net> 2.0.2-1
c82b495
- updated to 2.0.2
c82b495
- dropped GCC4 fix (upstream'd)
c82b495
- split off inchi package
c82b495
- added python and perl bindings packages
c82b495
c82b495
* Sat Jan 07 2006 Dominik Mierzejewski <rpm@greysector.net> 2.0.0-1
c82b495
- updated to 2.0.0
c82b495
- fix compilation with GCC4
c82b495
- FE compliance
c82b495
c82b495
* Thu Feb 10 2005 Dominik Mierzejewski <rpm@greysector.net> 1.100.2-1
c82b495
- rebuilt for Fedora 3
c82b495
c82b495
* Tue Jan 18 2005 ALT QA Team Robot <qa-robot@altlinux.org> 1.100.2-alt1.1
c82b495
- Rebuilt with libstdc++.so.6.
c82b495
c82b495
* Wed Mar 03 2004 Michael Shigorin <mike@altlinux.ru> 1.100.2-alt1
c82b495
- 1.100.2
c82b495
c82b495
* Wed Dec 17 2003 Michael Shigorin <mike@altlinux.ru> 1.100.1-alt2
c82b495
- removed *.la
c82b495
- don't package static library by default
c82b495
c82b495
* Mon Sep 22 2003 Michael Shigorin <mike@altlinux.ru> 1.100.1-alt1
c82b495
- 1.100.1
c82b495
- #2994 fixed; thanks to Alex Ott (ott@) for a pointer
c82b495
- spec cleanup (underlibification fixup)
c82b495
c82b495
* Mon Jun 30 2003 Michael Shigorin <mike@altlinux.ru> 1.100.0-alt1
c82b495
- built for ALT Linux
c82b495
- based on Mandrake Cooker spec by:
c82b495
  * Lenny Cartier <lenny@mandrakesoft.com>
c82b495
  * Austin Acton <aacton@yorku.ca>
c82b495
- spec cleanup