- .pyo files no longer ghosted
- fix chicken-and-egg problem when building perl and python bindings
This commit is contained in:
parent
b3785c653e
commit
18facae2db
|
@ -0,0 +1,24 @@
|
|||
--- openbabel-2.0.2/scripts/perl/Makefile.PL.chicken 2006-05-03 17:54:54.000000000 +0200
|
||||
+++ openbabel-2.0.2/scripts/perl/Makefile.PL 2006-09-20 05:55:53.000000000 +0200
|
||||
@@ -4,7 +4,8 @@
|
||||
$srcdir = '../../src';
|
||||
|
||||
# check if we're compiling in the source directory
|
||||
-$ldfrom = '$(OBJECT) -lopenbabel -lz';
|
||||
+$ldfrom = "\$(OBJECT) -L$srcdir/.libs -lopenbabel -lz"
|
||||
+ if (-r "$srcdir/.libs/libopenbabel.so") and (-s _) and (-B _);
|
||||
$ldfrom = "\$(OBJECT) $srcdir/.libs/libopenbabel.a -lz"
|
||||
if (-r "$srcdir/.libs/libopenbabel.a") and (-s _) and (-B _);
|
||||
|
||||
--- openbabel-2.0.2/scripts/python/setup.py.chicken 2006-05-03 17:54:53.000000000 +0200
|
||||
+++ openbabel-2.0.2/scripts/python/setup.py 2006-09-20 05:53:33.000000000 +0200
|
||||
@@ -41,6 +41,9 @@
|
||||
"INFO: Looking for library and include files in ../../src\n")
|
||||
if os.path.isfile("../../src/atom.o"):
|
||||
return ["../../src"],["../../src"]
|
||||
+ else:
|
||||
+ if os.path.isfile("../../src/atom.lo"):
|
||||
+ return ["../../src"],["../../src/.libs"]
|
||||
|
||||
sys.stderr.write("ERROR: Cannot find Open Babel library directory\n")
|
||||
return (None,None)
|
|
@ -1,6 +1,3 @@
|
|||
#%%define _with_perl 1
|
||||
#%%define _with_python 1
|
||||
|
||||
%define perl_vendorarch %(eval "`perl -V:installvendorarch`"; echo $installvendorarch)
|
||||
%define perl_archlib %(eval "`perl -V:archlib`"; echo $archlib)
|
||||
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
|
@ -10,18 +7,24 @@
|
|||
|
||||
Name: openbabel
|
||||
Version: 2.0.2
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: Chemistry software file format converter
|
||||
License: GPL
|
||||
Group: Applications/File
|
||||
URL: http://openbabel.sourceforge.net/
|
||||
Source: http://dl.sourceforge.net/sourceforge/openbabel/%{name}-%{version}.tar.gz
|
||||
Patch: %{name}-cxxflags.patch
|
||||
Patch0: %{name}-cxxflags.patch
|
||||
Patch1: %{name}-chicken.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
#BuildRequires: doxygen
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: perl
|
||||
BuildRequires: python
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: swig
|
||||
BuildRequires: zlib-devel
|
||||
|
||||
%description
|
||||
|
@ -76,52 +79,39 @@ If you are going to develop programs which will use this library
|
|||
you should install inchi-devel. You'll also need to have the
|
||||
inchi package installed.
|
||||
|
||||
%if 0%{?_with_perl:1}
|
||||
%package perl
|
||||
Group: System Environment/Libraries
|
||||
Summary: Perl wrapper for the Open Babel library
|
||||
BuildRequires: openbabel-devel
|
||||
BuildRequires: perl
|
||||
|
||||
%description perl
|
||||
Perl wrapper for the Open Babel library.
|
||||
%endif
|
||||
|
||||
%if 0%{?_with_python:1}
|
||||
%package python
|
||||
Group: System Environment/Libraries
|
||||
Summary: Python wrapper for the Open Babel library
|
||||
BuildRequires: openbabel-devel
|
||||
BuildRequires: python
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: swig
|
||||
|
||||
%description python
|
||||
Python wrapper for the Open Babel library.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch -p1 -b .cxxflags
|
||||
%patch0 -p1 -b .cxxflags
|
||||
%patch1 -p1 -b .chicken
|
||||
|
||||
%build
|
||||
autoreconf --force --install
|
||||
%configure --enable-shared=yes --enable-static=no
|
||||
%{__make} %{?_smp_mflags}
|
||||
|
||||
%if 0%{?_with_perl:1}
|
||||
pushd scripts/perl
|
||||
perl Makefile.PL INSTALLDIRS="vendor"
|
||||
%{__make} %{?_smp_mflags} OPTIMIZE="$RPM_OPTS_FLAGS"
|
||||
%{__make} test
|
||||
%{__make} %{?_smp_mflags} OPTIMIZE="$RPM_OPT_FLAGS"
|
||||
#%{__make} test
|
||||
popd
|
||||
%endif
|
||||
|
||||
%if 0%{?_with_python:1}
|
||||
pushd scripts/python
|
||||
python setup.py build
|
||||
popd
|
||||
%endif
|
||||
|
||||
%install
|
||||
%{__rm} -rf $RPM_BUILD_ROOT
|
||||
|
@ -130,18 +120,16 @@ popd
|
|||
|
||||
%{__rm} -f $RPM_BUILD_ROOT%{_libdir}{,/%{name}}/*.la
|
||||
|
||||
%if 0%{?_with_perl:1}
|
||||
pushd scripts/perl
|
||||
%{__make} install DESTDIR=$RPM_BUILD_ROOT
|
||||
popd
|
||||
%{__rm} -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
|
||||
%{__rm} -f $RPM_BUILD_ROOT%{perl_vendorarch}/*/Chemistry/OpenBabel/{.packlist,OpenBabel.bs}
|
||||
%endif
|
||||
%if 0%{?_with_python:1}
|
||||
|
||||
pushd scripts/python
|
||||
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
|
||||
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
||||
popd
|
||||
%endif
|
||||
|
||||
%clean
|
||||
%{__rm} -rf $RPM_BUILD_ROOT
|
||||
|
@ -182,24 +170,22 @@ popd
|
|||
%{_includedir}/inchi
|
||||
%{_libdir}/libinchi.so
|
||||
|
||||
%if 0%{?_with_perl:1}
|
||||
%files perl
|
||||
%defattr(-,root,root,-)
|
||||
%{perl_vendorarch}/Chemistry/OpenBabel.pm
|
||||
%dir %{perl_vendorarch}/*/Chemistry/OpenBabel
|
||||
%{perl_vendorarch}/*/Chemistry/OpenBabel/OpenBabel.so
|
||||
%endif
|
||||
|
||||
%if 0%{?_with_python:1}
|
||||
%files python
|
||||
%defattr(-,root,root,-)
|
||||
%{python_sitearch}/_openbabel.so
|
||||
%{python_sitearch}/openbabel.py
|
||||
%{python_sitearch}/openbabel.pyc
|
||||
%ghost %{python_sitearch}/openbabel.pyo
|
||||
%endif
|
||||
%{python_sitearch}/openbabel.py*
|
||||
|
||||
%changelog
|
||||
* Wed Sep 20 2006 Dominik Mierzejewski <rpm@greysector.net> 2.0.2-4
|
||||
- .pyo files no longer ghosted
|
||||
- fix chicken-and-egg problem when building perl and python bindings
|
||||
|
||||
* Tue Aug 29 2006 Dominik Mierzejewski <rpm@greysector.net> 2.0.2-3
|
||||
- simplified autotools invocation
|
||||
- mass rebuild
|
||||
|
|
Loading…
Reference in New Issue