File votca-tools.spec of Package votca-tools
#
# votca_tools.spec
#
# Copyright (c) 2013-2014 Christoph Junghans <junghans@votca.org>
#
# Originally written by Jussi Lehtola <jussilehtola@fedoraproject.org>
# Fixed for multi-distro build by Klaus Kaempf <kkaempf@suse.de>
#
# Licensed under the Apache Software License (ASL 2.0)
#
Name: votca-tools
Version: 1.2.4
Release: 0
Summary: VOTCA tools library
Group: Productivity/Scientific/Chemistry
License: Apache-2.0
URL: http://www.votca.org
Source0: http://downloads.votca.googlecode.com/hg/%{name}-%{version}_pristine.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++
%if %{defined fedora}
BuildRequires: pkgconfig
BuildRequires: expat-devel
%else
BuildRequires: pkg-config
BuildRequires: libexpat-devel
%endif
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(fftw3)
BuildRequires: pkgconfig(gsl)
BuildRequires: boost-devel >= 1.39.0
BuildRequires: cmake
BuildRequires: txt2tags
%description
Versatile Object-oriented Toolkit for Coarse-graining Applications (VOTCA) is
a package intended to reduce the amount of routine work when doing systematic
coarse-graining of various systems. The core is written in C++.
%package -n libvotca_tools2
Summary: VOTCA tools library
Group: Productivity/Scientific/Chemistry
%description -n libvotca_tools2
Versatile Object-oriented Toolkit for Coarse-graining Applications (VOTCA) is
a package intended to reduce the amount of routine work when doing systematic
coarse-graining of various systems. The core is written in C++.
This package contains the basic tools library of VOTCA package.
%package devel
Summary: Development headers and libraries for votca-tools
Group: Development/Libraries/C and C++
Requires: libvotca_tools2 = %{version}-%{release}
%description devel
Versatile Object-oriented Toolkit for Coarse-graining Applications (VOTCA) is
a package intended to reduce the amount of routine work when doing systematic
coarse-graining of various systems. The core is written in C++.
This package contains development headers and libraries for votca-tools.
%prep
%setup -q
# Get rid of bundled versions of boost and expat
rm -rf src/libboost
rm -rf src/libexpat
%build
%if %{defined fedora}
mkdir build
cd build
%endif
%if %{undefined cmake}
%define cmake cmake
mkdir build
cd build
%endif
%{cmake} \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DWITH_RC_FILES=OFF \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags}" \
-DCMAKE_CXX_FLAGS_RELEASE:STRING="%{optflags}" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SKIP_RPATH=1 \
-DLIB=%{_lib} ..
make %{?_smp_mflags}
%install
cd build
make install DESTDIR=%{buildroot}
%post -n libvotca_tools2 -p /sbin/ldconfig
%postun -n libvotca_tools2 -p /sbin/ldconfig
%files -n libvotca_tools2
%defattr(-,root,root,-)
%doc LICENSE NOTICE
%{_libdir}/libvotca_tools.so.*
%{_mandir}/man7/*
%files devel
%defattr(-,root,root,-)
%{_includedir}/votca/
%{_libdir}/libvotca_tools.so
%{_libdir}/pkgconfig/libvotca_tools.pc
%changelog