File wfmath.spec of Package wfmath
#
# spec file for package wfmath
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define libsuffix 1.0
%define soname 1_0-1
Name: wfmath
Version: 1.0.2
Release: 0
Summary: A math library
License: GPL-2.0
Group: Development/Languages/C and C++
Url: http://www.worldforge.org/dev/eng/libraries/wfmath
Source: https://github.com/worldforge/wfmath/archive/%{version}/%{name}-%{version}.tar.gz
# PATCH-FIX-SLE fix-old-autoconf.patch -- Fix build with old autoconf (SLE11 maybe openSUSE 13.1)
Patch0: fix-old-autoconf.patch
# PATCH-FIX-OPENSUSE fix-doxygen-contains-date.patch -- Fix use of date and time in documentation
Patch1: fix-doxygen-contains-date.patch
BuildRequires: automake
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: pkg-config
%if 0%{?suse_version} == 1110
# SLE 11 will complain about pkgconfig file in /usr/lib and noarch package
BuildRequires: -post-build-checks
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This is the WorldForge math library. The primary focus of %{name} is
geometric objects.
%package -n lib%{name}-%{soname}
Summary: A math library headers
Group: Development/Languages/C and C++
Provides: lib%{name}%{soname} = %{version}
%description -n lib%{name}-%{soname}
This is the WorldForge math library. The primary focus of %{name} is
geometric objects.
%package devel
Summary: A math library headers
Group: Development/Languages/C and C++
Requires: lib%{name}%{soname} = %{version}
%description devel
This is the WorldForge math library. The primary focus of %{name} is
geometric objects.
%package docs
Summary: A math library documentation
Group: Documentation/Other
BuildArch: noarch
%description docs
This is the WorldForge math library. The primary focus of %{name} is
geometric objects.
%prep
%setup -q
%if 0%{?suse_version} < 1310
%patch0 -p1
%endif
%patch1 -p1
doxygen -u doc/Doxyfile.in
autoreconf -fi
%build
%configure
make %{?_smp_mflags}
make %{?_smp_mflags} docs
%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install
%fdupes %{buildroot}%{_docdir}
%post -n lib%{name}-%{soname} -p /sbin/ldconfig
%postun -n lib%{name}-%{soname} -p /sbin/ldconfig
%files -n lib%{name}-%{soname}
%defattr(-,root,root)
%doc AUTHORS COPYING NEWS README
%{_libdir}/lib*.so.*
%files devel
%defattr(-,root,root)
%{_libdir}/lib*.so
%{_libdir}/lib*.la
%{_libdir}/pkgconfig/*
%{_includedir}/%{name}-%{libsuffix}
%files docs
%defattr(-,root,root)
%doc doc/html/*
%changelog