Skip to content

Instantly share code, notes, and snippets.

@fusion809
Created August 28, 2018 19:47
Show Gist options
  • Save fusion809/cd9538cb80ded907d38e5caa80caaf4d to your computer and use it in GitHub Desktop.
Save fusion809/cd9538cb80ded907d38e5caa80caaf4d to your computer and use it in GitHub Desktop.
# Maintainer: Brenton Horne <brentonhorne77 at gmail dot com>
Name: mmtf
#%%define libsoname libavogadro1_91
Version: 65
%define commit 63e58a9057ee684b5a0a409932e7fc2126894fc0
%define c2commit cf4b7eead92773932f32c7efd2612e9d27b07557
%define speccommit 8c8883457e54fb460908a57d801212c56a603aec
%define msgcommit 7a98138f27f27290e680bf8fbf1f8d1b089bf138
Release: 1%{?dist}
Summary: Avogadro2 Python %{python3_version} libraries
# BSD is main license
# MIT is the license of jsoncpp.a
License: MIT
Group: Productivity/Scientific/Chemistry
BuildRequires: cmake gcc-c++
BuildRequires: doxygen
URL: https://github.com/rcsb/mmtf-cpp
Source0: https://github.com/rcsb/mmtf-cpp/archive/%{commit}.tar.gz
Source1: https://github.com/msgpack/msgpack-c/archive/%{msgcommit}.tar.gz
Source2: https://github.com/catchorg/Catch2/archive/%{c2commit}.tar.gz
Source3: https://github.com/rcsb/mmtf/archive/%{speccommit}.tar.gz
%description
Avogadro libraries provide 3D rendering, visualization, analysis
and data processing useful in computational chemistry, molecular modeling,
bioinformatics, materials science, and related areas.
This specific package only provides Python %{python3_version} libraries
for it, however.
%package devel
Summary: Development files of %{name}
Group: Development/Libraries/C and C++
Requires: %{name}%{?_isa} = %{version}-%{release}
#Requires: %{libsoname}-devel = %{version}-%{release}
#Requires: %{libsoname} = %{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
The HTML documentation of %{name}.
%prep
%setup -q -n mmtf-cpp-%{commit}
rm -rf Catch2 mmtf_spec msgpack-c
tar xf %{SOURCE1}
mv msgpack-c-%{msgcommit} msgpack-c
tar xf %{SOURCE2}
mv Catch2-%{c2commit} Catch2
tar xf %{SOURCE3}
mv mmtf-%{speccommit} mmtf_spec
%build
%cmake -DCMAKE_BUILD_TYPE:STRING=Release -DMSGPACKC_INCLUDE_DIR=msgpack-c/include
%make_build
#pushd docs
#doxygen
#popd
%install
%make_install -C build
%check
pushd build
ctest -VV
#%%post -p /sbin/ldconfig
#%%post -n %{libsoname} -p /sbin/ldconfig
#%%postun -p /sbin/ldconfig
#%%postun -n %{libsoname} -p /sbin/ldconfig
%files
%dir %{_libexecdir}/mmtf
%files devel
%dir %{_includedir}/mmtf/
%{_includedir}/mmtf
%files doc
%doc README.md CONTRIBUTING.md build/docs/html
%license LICENSE
%changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment