You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
grantlee-qt5/grantlee-qt5.spec

157 lines
4.4 KiB

10 years ago
%define apidocs 1
Name: grantlee-qt5
Summary: Qt5 string template engine based on the Django template system
9 years ago
Version: 5.1.0
Release: 2%{?dist}
10 years ago
License: LGPLv2+
URL: https://github.com/steveire/grantlee
Source0: http://downloads.grantlee.org/grantlee-%{version}%{?pre:-%{pre}}.tar.gz
%global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
Source1: macros.grantlee5
%global grantlee5_plugins 5.1
%global grantlee5_plugindir %{_libdir}/grantlee/%{grantlee5_plugins}/
Provides: %{name}(%{grantlee5_plugins}) = %{version}-%{release}
9 years ago
10 years ago
## upstreamable patches
# Install headers into a versioned directory to be parallel-installable
9 years ago
# based on:
10 years ago
# https://github.com/steveire/grantlee/pull/1
9 years ago
Patch1: grantlee-5.1.0-install_headers_into_versioned_directory.patch
10 years ago
BuildRequires: cmake >= 2.8.12
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Script)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: qt5-linguist
%if 0%{?apidocs}
BuildRequires: doxygen
BuildRequires: graphviz
%endif
## for %%check
BuildRequires: xorg-x11-server-Xvfb
%description
Grantlee is a plug-in based String Template system written
using the Qt framework. The goals of the project are to make it easier for
application developers to separate the structure of documents from the
data they contain, opening the door for theming.
The syntax is intended to follow the syntax of the Django template system,
and the design of Django is reused in Grantlee.
Part of the design of both is that application developers can extend
the syntax by implementing their own tags and filters. For details of
how to do that, see the API documentation.
For template authors, different applications using Grantlee will present
the same interface and core syntax for creating new themes. For details of
how to write templates, see the documentation.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package apidocs
Summary: Grantlee API documentation
Requires: kde-filesystem
BuildArch: noarch
%description apidocs
This package includes the Grantlee API documentation in HTML
format for easy browsing.
%prep
9 years ago
%autosetup -n grantlee-%{version} -p1
10 years ago
%build
mkdir %{_target_platform}
pushd %{_target_platform}
%{cmake} .. \
-DCMAKE_BUILD_TYPE=release
popd
make %{?_smp_mflags} -C %{_target_platform}
%if 0%{?apidocs}
make docs -C %{_target_platform}
%endif
%install
make install/fast -C %{_target_platform} DESTDIR=%{buildroot}
%if 0%{?apidocs}
mkdir -p %{buildroot}%{_docdir}/HTML/en/Grantlee5/
cp -prf %{_target_platform}/apidox/* %{buildroot}%{_docdir}/HTML/en/Grantlee5/
%endif
# rpm macros
install -p -m644 -D %{SOURCE1} \
%{buildroot}%{rpm_macros_dir}/macros.grantlee5
sed -i \
-e "s|@@NAME@@|%{name}|g" \
-e "s|@@EPOCH@@|%{?epoch}%{!?epoch:0}|g" \
-e "s|@@VERSION@@|%{version}|g" \
-e "s|@@EVR@@|%{?epoch:%{epoch:}}%{version}-%{release}|g" \
-e "s|@@GRANTLEE5_PLUGINS@@|%{grantlee5_plugins}|g" \
-e "s|@@GRANTLEE5_PLUGINDIR@@|%{grantlee5_plugindir}|g" \
%{buildroot}%{rpm_macros_dir}/macros.grantlee5
10 years ago
%check
export CTEST_OUTPUT_ON_FAILURE=1
xvfb-run -a make test -C %{_target_platform} ||:
10 years ago
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%license COPYING.LIB
9 years ago
%doc AUTHORS CHANGELOG README.md
10 years ago
%{_libdir}/libGrantlee_Templates.so.5*
%{_libdir}/libGrantlee_TextDocument.so.5*
%dir %{_libdir}/grantlee/
%{grantlee5_plugindir}/
10 years ago
%files devel
%{_includedir}/Grantlee5/
%{_libdir}/libGrantlee_Templates.so
%{_libdir}/libGrantlee_TextDocument.so
%dir %{_libdir}/cmake/
10 years ago
%{_libdir}/cmake/Grantlee5/
%{rpm_macros_dir}/macros.grantlee5
10 years ago
%if 0%{?apidocs}
%files apidocs
%{_docdir}/HTML/en/Grantlee5/
%endif
%changelog
* Wed Aug 17 2016 Rex Dieter <rdieter@fedoraproject.org> - 5.1.0-2
- macros.grantlee5: notably, %%{grantlee5_plugindir} %%{grantlee5_requires}
9 years ago
* Tue Apr 19 2016 Rex Dieter <rdieter@fedoraproject.org> - 5.1.0-1
- grantlee-5.1.0
* Fri Feb 19 2016 Rex Dieter <rdieter@fedoraproject.org> 5.0.0-4
- grantlee-qt5: FTBFS in rawhide (#1307592)
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
10 years ago
* Sat Aug 08 2015 Rex Dieter <rdieter@fedoraproject.org> 5.0.0-2
- update URL
* Thu May 28 2015 Rex Dieter <rdieter@fedoraproject.org> 5.0.0-1
- grantlee-5.0.0