File smesh.spec of Package smesh

#
# spec file for package smesh
# copied from Fedora, MIT licensed as per FPCA
#
# Copyright (c) 2014 Richard M. Shaw
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:

# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

Name:           smesh
Version:        6.7
Release:        0
Summary:        OpenCascade based MESH framework
License:        LGPL-2.0
Url:            https://github.com/tpaviot/smesh
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  oce-devel
BuildRequires:  cmake
BuildRequires:  doxygen
BuildRequires:  gcc-c++
BuildRequires:  graphviz
BuildRequires:  boost-devel
BuildRequires:  dos2unix
BuildRequires:  f2c
BuildRequires:  gcc-fortran
# New BRs
BuildRequires:  freeimage-devel
BuildRequires:  freetype2-devel
BuildRequires:  libSM-devel
BuildRequires:  libX11-devel
BuildRequires:  libXext-devel
BuildRequires:  glu-devel
BuildRequires:  tbb-devel

# Dependencies for optional NETGENPlugin library.
#BuildRequires:  netgen-mesher-devel
#BuildRequires:  netgen-mesher-devel-private

%description
A complete OpenCascade based MESH framework.


%package doc
Summary:        Development documentation for %{name}
Requires:       %{name} = %{version}-%{release}
BuildArch:      noarch

%description doc
Development documentation for %{name}.


%package devel
Summary:        Development files for %{name}
Group:		Development/Libraries/Other
Requires:       %{name}%{?_isa} = %{version}-%{release}

%description devel
Development files and headers for %{name}.


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

rm -rf boost\-*
dos2unix -k LICENCE.lgpl.txt

%build
LDFLAGS='-Wl,--as-needed'; export LDFLAGS
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
       -DMONOLITHIC_BUILD=OFF \
       -DSMESH_TESTING=OFF \
       ../

make %{?_smp_mflags}

# Build documentation
make doc

%install
pushd build
%make_install

# Install documentation
mkdir -p %{buildroot}%{_docdir}/smesh
mv %{buildroot}/usr/share/doc/smesh/html %{buildroot}%{_docdir}/smesh/

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

%files
%doc LICENCE.lgpl.txt
%{_libdir}/*.so.*
%exclude %{_docdir}/smesh/html

%files doc
%{_docdir}/smesh/html

%files devel
%{_includedir}/*
%{_libdir}/*.so

%changelog
openSUSE Build Service is sponsored by