%{!?python_sitelib:%global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch:%global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
Name: avogadro
Version: 1.0.0
Release: 2%{?dist}
Summary: An advanced molecular editor for chemical purposes
Group: Applications/Editors
License: GPLv2
URL: http://avogadro.openmolecules.net/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: cmake >= 2.6.0
BuildRequires: qt4-devel >= 4.5.1
BuildRequires: eigen2-devel >= 2.0.3
BuildRequires: openbabel-devel >= 2.2.2
BuildRequires: boost-devel >= 1.35
BuildRequires: glew-devel >= 1.5.0
BuildRequires: desktop-file-utils
BuildRequires: docbook-utils
BuildRequires: sip-devel
BuildRequires: numpy
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description
An advanced molecular editor designed for
cross-platform use in computational chemistry,
molecular modeling, bioinformatics, materials science,
and related areas, which offers flexible rendering and
a powerful plugin architecture.
%package libs
Summary: Shared libraries for Avogadro
Group: System Environment/Libraries
%{?_sip_api:Requires: sip-api(%{_sip_api_major}) >= %{_sip_api}}
%description libs
This package contains the shared libraries for the
molecular editor Avogadro.
%package devel
Summary: Development files for Avogadro
Group: Development/Libraries
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description devel
This package contains files to develop applications using
Avogadros libraries.
%prep
%setup -q
%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%{cmake} %{?BUILD_TESTS} -DENABLE_GLSL=ON -DENABLE_PYTHON=ON -DENABLE_UPDATE_CHECKER=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIB_INSTALL_DIR=%{_libdir} ..
popd
make %{?_smp_mflags} -C %{_target_platform}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform}
# system menu entry
desktop-file-install --vendor="" \
--dir=$RPM_BUILD_ROOT%{_datadir}/applications \
$RPM_BUILD_ROOT%{_datadir}/applications/avogadro.desktop
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/pixmaps/%{name}-icon.png
%{_datadir}/applications/%{name}.desktop
%files devel
%defattr(-,root,root,-)
%{_datadir}/lib%{name}
%{_includedir}/%{name}
%{_libdir}/*.so
%files libs
%defattr(-,root,root,-)
%{python_sitelib}/Avogadro.so
%{_libdir}/%{name}
%{_libdir}/*.so.*
%changelog
* Mon Nov 16 2009 Rex Dieter <rdieter@fedoraproject.org> - 1.0.0-2
- -libs: Requires: sip-api(%%_sip_api_major) >= %%_sip_api (#538124)
- Requires: %%{name}-libs ...
* Thu Oct 29 2009 Sebastian Dziallas <sebastian@when.com> 1.0.0-1
- update to new upstream release
* Tue Oct 20 2009 Rex Dieter <rdieter@fedoraproject.org> 0.9.8-3
- rebuild (eigen2)
* Sat Sep 26 2009 Sebastian Dziallas <sebastian@when.com> 0.9.8-2
- fix typo in file list
* Sat Sep 26 2009 Sebastian Dziallas <sebastian@when.com> 0.9.8-1
- update to new upstream release
- enable python and glsl support again
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Sat Jun 06 2009 Sebastian Dziallas <sebastian@when.com> 0.9.6-1
- new upstream release to fix issue with qt 4.5.0 and earlier
* Wed Jun 03 2009 Sebastian Dziallas <sebastian@when.com> 0.9.5-3
- remove remaining python parts
- fix files section finally
* Wed Jun 03 2009 Sebastian Dziallas <sebastian@when.com> 0.9.5-2
- disable python and glsl for now
- fix files section
* Wed Jun 03 2009 Sebastian Dziallas <sebastian@when.com> 0.9.5-1
- update to new release
* Tue May 12 2009 Sebastian Dziallas <sebastian@when.com> 0.9.4-1
- update to new release
* Fri Apr 10 2009 Sebastian Dziallas <sebastian@when.com> 0.9.3-1
- update to new release
* Sat Mar 21 2009 Sebastian Dziallas <sebastian@when.com> 0.9.2-2
- get desktop file properly installed
* Sat Mar 14 2009 Sebastian Dziallas <sebastian@when.com> 0.9.2-1
- update to new release
* Wed Feb 25 2009 Sebastian Dziallas <sebastian@when.com> 0.9.1-1
- update to new release
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Thu Jan 22 2009 Sebastian Dziallas <sebastian@when.com> 0.9.0-1
- update to new release
* Sun Sep 14 2008 Sebastian Dziallas <sebastian@when.com> 0.8.1-6
- add handbook to docs
* Sun Sep 14 2008 Sebastian Dziallas <sebastian@when.com> 0.8.1-5
- add build requirements and fix group names
* Wed Aug 13 2008 Sebastian Dziallas <sebastian@when.com> 0.8.1-4
- fix typos
* Sat Aug 9 2008 Sebastian Dziallas <sebastian@when.com> 0.8.1-3
- reorganize spec file
* Sat Aug 9 2008 Sebastian Dziallas <sebastian@when.com> 0.8.1-2
- rename shared library package and structure spec file
* Sun Aug 3 2008 Sebastian Dziallas <sebastian@when.com> 0.8.1-1
- initial pacakging release based on PackMan release