File qdpxx-scalar.spec of Package qdpxx

# Copyright © 2016-2017 Martin Ueding <dev@martin-ueding.de>

%global commit0 0cfacaf0621a888e5b704ba4f53477961e38cd73
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})

%global cvs_version qdp1-44-0 
%global git_version 131
%global git_shortcommit g0cfacaf

%global cxxflags "-O2 --std=c++11 -fopenmp -g"
%global cflags "-O2 --std=c99 -fopenmp -g"

Name:           qdpxx-scalar
Version:        1.44.0.git%{git_version}
Release:        2%{?dist}
Summary:        The QDP++ Framework for Lattice QCD

License:        unknown
URL:            http://usqcd-software.github.io/qdpxx/
Source0:        qdpxx-%{cvs_version}-%{git_version}-%{git_shortcommit}.tar

BuildRequires:  libstdc++-devel autoconf gcc-c++ automake
BuildRequires:  libxml2-devel
Requires:       libstdc++ libxml2

Conflicts:      qdpxx-parscalar

%description

%prep
%autosetup -n qdpxx-%{cvs_version}-%{git_version}-%{git_shortcommit} -p1

%build

for configure_ac in $(find . -name configure.ac | tac); do
    pushd "${configure_ac%/*}"
    aclocal
    automake --add-missing --copy || autoreconf -f || automake --add-missing --copy
    autoreconf -fiv
    popd
done

%configure \
        --enable-openmp \
        --enable-parallel-arch=scalar \
        --with-libxml2=/usr/bin/xml2-config \
        CC=/usr/bin/gcc \
        CXX=/usr/bin/g++ \
        CFLAGS=%{cflags} \
        CXXFLAGS=%{cxxflags} || (cat config.log && exit 1)

make %{?_smp_mflags} CFLAGS=%{cflags} CXXFLAGS=%{cxxflags}

%install

%make_install

%files

%{_bindir}/*
%{_libdir}/*

%package devel

Summary:        The QDP++ Framework for Lattice QCD (devel)

%description devel

%files devel

%{_includedir}/*

%changelog
openSUSE Build Service is sponsored by