File grantlee5.spec of Package grantlee5

# spec file for package grantlee5
# Copyright (c) 2019 SUSE LLC
# 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

%bcond_without tests

%{?!cmake_build:%global cmake_build() make %{?_smp_mflags} VERBOSE=1}
%{?!cmake_install:%global cmake_install() DESTDIR=%{buildroot} make install}

Name:           grantlee5
Version:        5.2.0
Release:        0
Summary:        Qt string template library
License:        LGPL-2.1-or-later
Group:          System/Libraries
Source2:        baselibs.conf
# PATCH-FIX-OPENSUSE includes.diff -- since upstream doesn't provide a way to install to custom directory, we cheat!
Patch0:         includes.diff
# PATCH-FIX-OPENSUSE grantlee-5.2.0-fix-ctest-ld-library-path.patch -- set ld library path for tests
Patch1:         grantlee-5.2.0-fix-ctest-ld-library-path.patch
# PATCH-FIX-OPENSUSE grantlee-5.2.0-fix-ctest-ld-library-path.patch -- disable tests for now that throwing an exception for some reason
Patch2:         grantlee-5.2.0-disable-textdocument-tests.patch
BuildRequires:  cmake >= 3.5
BuildRequires:  cmake(Qt5Core) >= 5.3
BuildRequires:  cmake(Qt5Gui) >= 5.3
BuildRequires:  cmake(Qt5Qml) >= 5.3
%if %{with tests}
BuildRequires:  cmake(Qt5Test) >= 5.3

Grantlee is a string template engine based on the Django template system and
written in Qt.

%package devel
Summary:        Include Files and Libraries Mandatory for Development with Grantlee
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}
Requires:       cmake >= 3.5
Requires:       cmake(Qt5Core) >= 5.3
Requires:       cmake(Qt5Gui) >= 5.3

%description devel
This package contains include files and libraries needed for development with

%autosetup -p1 -n grantlee-%{version}

%cmake \



%if %{with tests}

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

%license COPYING*

%files devel
%license COPYING*