File QCSXCAD.spec of Package QCSXCAD
#
# spec file for package QCSXCAD
#
# Copyright (c) 2017 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/
#
Name: QCSXCAD
Version: 0.6.1
Release: 0
%define so_ver 0
%define libname lib%{name}%{so_ver}
Summary: Qt-GUI for CSXCAD library
License: LGPL-3.0+
Group: Productivity/Graphics/CAD
Url: http://openems.de
Source0: https://github.com/thliebig/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-OPENSUSE QCSXCAD-no-build-date.patch -- Remove build date from binaries
Patch1: QCSXCAD-no-build-date.patch
BuildRequires: CSXCAD-devel
BuildRequires: cmake
BuildRequires: tinyxml-devel
BuildRequires: vtk-devel
%if 0%{?suse_version} > 1320
BuildRequires: cmake(Qt5Sql)
BuildRequires: cmake(Qt5Widgets)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5Xml)
%else
BuildRequires: libqt4-devel
%endif
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(python3)
BuildRequires: pkgconfig(sm)
BuildRequires: pkgconfig(xt)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
A Qt-GUI for the CSXCAD library.
%package -n %{libname}
Summary: Qt-GUI for CSXCAD library
Group: System/Libraries
%description -n %{libname}
A Qt-GUI for the CSXCAD library.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
Requires: %{libname} = %{version}
%description devel
A Qt-GUI for the CSXCAD library.
This package contains libraries and header files for developing
applications that use %{name}.
%prep
%setup -q
%patch1 -p1
%build
%cmake
make %{?_smp_mflags}
%install
%cmake_install
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%files -n %{libname}
%defattr(-,root,root,-)
%doc COPYING NEWS README
%{_libdir}/lib%{name}.so.*
%files devel
%defattr(-,root,root,-)
%{_libdir}/lib%{name}.so
%{_includedir}/%{name}/
%changelog