8b15e9e
Name:           avogadro
8b15e9e
Version:        0.8.1
8b15e9e
Release:        6%{?dist}
8b15e9e
Summary:        Avogadro is an advanced Molecular editor
8b15e9e
8b15e9e
Group:          Applications/Editors
8b15e9e
License:        GPLv2
8b15e9e
URL:            http://avogadro.openmolecules.net/
8b15e9e
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
8b15e9e
Source1:        %{name}.desktop
8b15e9e
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
8b15e9e
8b15e9e
BuildRequires:  cmake >= 2.4.5
8b15e9e
BuildRequires:  qt4-devel >= 4.3.0
8b15e9e
BuildRequires:  eigen-devel >= 1.0.5
8b15e9e
BuildRequires:  openbabel-devel >= 2.2.0
8b15e9e
BuildRequires:  python-devel >= 2.5.1
8b15e9e
BuildRequires:  desktop-file-utils
8b15e9e
BuildRequires:  docbook-utils
8b15e9e
BuildRequires:  docbook-utils-pdf
8b15e9e
8b15e9e
%description
8b15e9e
Avogadro is an advanced molecular editor designed
8b15e9e
for cross-platform use in computational chemistry,
8b15e9e
molecular modeling, bioinformatics, materials science,
8b15e9e
and related areas. It offers flexible rendering and
8b15e9e
a powerful plugin architecture.
8b15e9e
8b15e9e
8b15e9e
%package libs
8b15e9e
Summary:        Shared libraries for Avogadro
8b15e9e
Group:          System Environment/Libraries
8b15e9e
8b15e9e
%description libs
8b15e9e
This package contains the shared libraries for the
8b15e9e
molecular editor Avogadro.
8b15e9e
8b15e9e
8b15e9e
%package devel
8b15e9e
Summary:        Development files for Avogadro
8b15e9e
Group:          Development/Libraries
8b15e9e
Requires:       %{name}-libs = %{version}-%{release} 
8b15e9e
8b15e9e
%description devel
8b15e9e
This package contains files to develop applications using 
8b15e9e
Avogadros libraries.
8b15e9e
8b15e9e
8b15e9e
%prep
8b15e9e
%setup -q
8b15e9e
# permissions set by upstream would lead to rpmlint warning
8b15e9e
# spurious-executable-perm in debuginfo package
8b15e9e
chmod 0644 libavogadro/src/engines/iso.h
8b15e9e
chmod 0644 libavogadro/src/tools/autoopttool.cpp
8b15e9e
chmod 0644 libavogadro/src/tools/autoopttool.h
8b15e9e
8b15e9e
8b15e9e
%build
8b15e9e
mkdir -p %{_target_platform}
8b15e9e
pushd %{_target_platform}
8b15e9e
%{cmake} %{?BUILD_TESTS} -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIB_INSTALL_DIR=%{_lib} ..
8b15e9e
popd
8b15e9e
make %{?_smp_mflags} -C %{_target_platform}
8b15e9e
8b15e9e
8b15e9e
%install
8b15e9e
rm -rf $RPM_BUILD_ROOT
8b15e9e
make install DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform}
8b15e9e
8b15e9e
# app icon
8b15e9e
install -p -D -m644 ./avogadro/src/icons/avogadro.svg $RPM_BUILD_ROOT/%{_datadir}/pixmaps/avogadro.svg
8b15e9e
8b15e9e
# system menu entry
8b15e9e
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
8b15e9e
desktop-file-install --vendor=""                 \
8b15e9e
  --dir=$RPM_BUILD_ROOT%{_datadir}/applications  \
8b15e9e
  %{SOURCE1}
8b15e9e
8b15e9e
8b15e9e
%post libs -p /sbin/ldconfig
8b15e9e
8b15e9e
%postun libs -p /sbin/ldconfig
8b15e9e
8b15e9e
8b15e9e
%clean
8b15e9e
rm -rf $RPM_BUILD_ROOT
8b15e9e
8b15e9e
8b15e9e
%files
8b15e9e
%defattr(-,root,root,-)
8b15e9e
%doc AUTHORS ChangeLog COPYING ./doc/pdf/index.pdf
8b15e9e
%{_bindir}/%{name}
8b15e9e
%{_datadir}/%{name}
8b15e9e
%{_datadir}/pixmaps/%{name}.svg
8b15e9e
%{_datadir}/applications/%{name}.desktop
8b15e9e
8b15e9e
8b15e9e
%files devel
8b15e9e
%defattr(-,root,root,-)
8b15e9e
%{_datadir}/libavogadro
8b15e9e
%{_includedir}/%{name}
8b15e9e
%{_libdir}/*.so
8b15e9e
8b15e9e
8b15e9e
%files libs
8b15e9e
%defattr(-,root,root,-)
8b15e9e
%{_libdir}/%{name}
8b15e9e
%{_libdir}/*.so.*
8b15e9e
8b15e9e
8b15e9e
%changelog
8b15e9e
* Sun Sep 14 2008 Sebastian Dziallas <sebastian@when.com> 0.8.1-6
8b15e9e
- add handbook to docs
8b15e9e
8b15e9e
* Sun Sep 14 2008 Sebastian Dziallas <sebastian@when.com> 0.8.1-5
8b15e9e
- add build requirements and fix group names
8b15e9e
8b15e9e
* Wed Aug 13 2008 Sebastian Dziallas <sebastian@when.com> 0.8.1-4
8b15e9e
- fix typos
8b15e9e
8b15e9e
* Sat Aug  9 2008 Sebastian Dziallas <sebastian@when.com> 0.8.1-3
8b15e9e
- reorganize spec file
8b15e9e
8b15e9e
* Sat Aug  9 2008 Sebastian Dziallas <sebastian@when.com> 0.8.1-2
8b15e9e
- rename shared library package and structure spec file
8b15e9e
8b15e9e
* Sun Aug  3 2008 Sebastian Dziallas <sebastian@when.com> 0.8.1-1
8b15e9e
- initial pacakging release based on PackMan release