File libmercator-0_4-0.spec of Package mercator

Summary: A WorldForge terrain library
Name: libmercator-0_4-0
Version: 0.4.0
Release: 1
License: GPL-2.0
URL: https://www.worldforge.org/index.php/components/mercator
Vendor: WorldForge
Source0: mercator-%{version}.tar.xz
BuildRequires: pkgconfig libwfmath-1_0-1-devel cmake

%if 0%{?leap_version} == 420300
BuildRequires: gcc7-c++
%else
BuildRequires: gcc-c++
%endif

%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
BuildRequires: glibc-all-langpacks
%endif

%description
Mercator is designed to handle terrain data.

%package devel
Summary: A WorldForge terrain library headers and static libs
Group: Development/Libraries/C and C++
Requires: %{name} = %{version} libwfmath-1_0-1-devel

%description devel
Mercator is designed to handle terrain data.

This package comtaims the development headers and static library files.

%if 0%{?suse_version}
%debug_package
%endif

%prep
%setup -q -n mercator-%{version}

%build

%if 0%{?leap_version} == 420300
export CC=gcc-7
export CXX=/usr/bin/g++-7
%endif

cmake -DCMAKE_CXX_FLAGS="%{optflags}" \
    -DCMAKE_INSTALL_PREFIX=%{_prefix} \
    -DBUILD_SHARED_LIBS=ON \
    .
%{__make} %{?_smp_mflags}

%install
%{__make} DESTDIR=%{buildroot} install

%check
%{__make} %{?jobs:-j%jobs} check

%post
ldconfig

%postun
ldconfig

%files
%{_libdir}/lib*.so.*
%doc AUTHORS COPYING NEWS README.md

%files devel
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*
%{_libdir}/cmake/mercator
%{_includedir}/*

%changelog

* Mon Mar 6 2017 Erik Ogenvik <erik@ogenvik.org> 0.4.0
First packaged version.
openSUSE Build Service is sponsored by