File grantlee.spec of Package grantlee

#
# spec file for package grantlee
#
# Copyright (c) 2014 SUSE LINUX Products 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:           grantlee
Version:        0.5.1
Release:        0
Summary:        Qt string template library
License:        LGPL-2.1+
Group:          System/Libraries
Url:            http://grantlee.org/
Source0:        http://downloads.grantlee.org/%{name}-%{version}.tar.gz
BuildRequires:  cmake >= 2.8.11
BuildRequires:  doxygen
BuildRequires:  kde4-filesystem
BuildRequires:  lcov
BuildRequires:  libqt4-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
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:       libgrantlee_core0 = %{version}
Requires:       libgrantlee_gui0 = %{version}

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

%package -n libgrantlee_core0
Summary:        Qt string template library
Group:          System/Libraries
# grantlee was last used in openSUSE 11.4 (grantlee-0.1.7)
Provides:       grantlee = %{version}
Obsoletes:      grantlee < %{version}

%description -n libgrantlee_core0
Grantlee is a string template engine based on the Django template system and
written in Qt.

%package -n libgrantlee_gui0
Summary:        Qt string template library
Group:          System/Libraries
# grantlee was last used in openSUSE 11.4 (grantlee-0.1.7)
Provides:       grantlee = %{version}
Obsoletes:      grantlee < %{version}

%description -n libgrantlee_gui0
Grantlee is a string template engine based on the Django template system and
written in Qt.

%prep
%setup -q

%build
%cmake_kde4 -d build -- -DBUILD_TESTS=OFF
%make_jobs

%install
cd build
%kde4_makeinstall
cd ..

%clean
rm -rf %{buildroot}

%post -n libgrantlee_core0 -p /sbin/ldconfig

%postun -n libgrantlee_core0 -p /sbin/ldconfig

%post -n libgrantlee_gui0 -p /sbin/ldconfig

%postun -n libgrantlee_gui0 -p /sbin/ldconfig

%files devel
%defattr(-,root,root,-)
%doc AUTHORS CHANGELOG COPYING.LIB README
%{_includedir}/grantlee/
%{_includedir}/grantlee_*.h
%{_libdir}/libgrantlee_core.so
%{_libdir}/libgrantlee_gui.so
%dir %{_libdir}/cmake
%{_libdir}/cmake/grantlee/

%files -n libgrantlee_core0
%defattr(-,root,root,-)
%doc AUTHORS CHANGELOG COPYING.LIB README
%{_libdir}/libgrantlee_core.so.0*
%{_libdir}/grantlee/

%files -n libgrantlee_gui0
%defattr(-,root,root,-)
%doc AUTHORS CHANGELOG COPYING.LIB README
%{_libdir}/libgrantlee_gui.so.0*

%changelog