Blob Blame History Raw
Name:           avogadro2-libs
Version:        1.90.0
Release:        5%{?dist}
Summary:        Avogadro2 libraries

# BSD is main license
# MIT is the license of jsoncpp.a
License:        BSD and MIT

# Fix compatibility with gcc7
Patch0:         %{name}-fix_gcc7_compatibility.patch

# Fix reported path
Patch1:         %{name}-fix_AvogadroLibsConfig.patch

# Set installation path of jsoncpp.a file
Patch2:         %{name}-set_jsoncpp_path.patch

# Set installation path of Python files
Patch3:         %{name}-set_pythonpath.patch

BuildRequires:  boost-devel, boost-python3-devel
BuildRequires:  cmake, chrpath
BuildRequires:  gcc-c++, doxygen
BuildRequires:  python3-devel
BuildRequires:  pkgconfig(eigen3)
BuildRequires:  pkgconfig(glew)
BuildRequires:  pkgconfig(openbabel-2.0)
BuildRequires:  mesa-libGLU-devel
BuildRequires:  hdf5-devel
BuildRequires:  spglib-devel, molequeue-devel
BuildRequires:  qt5-qtbase-devel, qt5-qttools-devel

Provides: %{name}-static = %{version}-%{release}
Provides: jsoncpp-static

Avogadro libraries provide 3D rendering, visualization, analysis
and data processing useful in computational chemistry, molecular modeling,
bioinformatics, materials science, and related areas.

%package  devel
Summary:  Development files of %{name}
Requires: qt5-qtbase-devel
Requires: %{name}%{?_isa} = %{version}-%{release}

%description devel
This package contains libraries and header files for developing
applications that use %{name}.

%package doc
Summary: HTML documentation of %{name}
BuildArch: noarch
%description doc
HTML documentation of %{name}.

%setup -q -n avogadrolibs-%{version}
%patch0 -p0
%patch1 -p0
%patch2 -p0
%patch3 -p0

mkdir build && pushd build
export LDFLAGS="%{__global_ldflags} -Wl,--as-needed"
 -DCMAKE_INSTALL_INCLUDEDIR:PATH=%{_includedir}/avogadro2 \
 -Wno-dev \
 -DPYTHON_VERSION:STRING=%{python3_version} \


pushd docs

%make_install -C build

sed -i -e '1i#!%{__python3}' %{buildroot}%{python3_sitearch}/avogadro2/scripts/inputGenerators/*.py
sed -i -e '1i#!%{__python3}' %{buildroot}%{python3_sitearch}/avogadro2/scripts/formatScripts/*.py

chrpath -d %{buildroot}%{_libdir}/lib*.so
rm -rf %{buildroot}%{_datadir}/doc

pushd build
#ctest -VV

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%license COPYING

%files devel

%files doc
%doc build/docs/html
%license COPYING

* Mon Mar 13 2017 Antonio Trande <> - 1.90.0-5
- Add ld scriptlets

* Sun Mar 12 2017 Antonio Trande <> - 1.90.0-4
- Set python3 installation directory

* Sun Mar 12 2017 Antonio Trande <> - 1.90.0-3
- Move jsoncpp.a into the private lib directory

* Sat Mar 11 2017 Antonio Trande <> - 1.90.0-2
- Use default paths

* Sat Mar 11 2017 Antonio Trande <> - 1.90.0-1
- Initial package