From 6c6b6db285c0557b64ed55d0a288ccd9a430d2f2 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sun, 30 Aug 2015 18:07:45 -0500 Subject: [PATCH] import --- .gitignore | 1 + ...l-headers-into-a-versioned-directory.patch | 56 ++++++++ grantlee-qt5.spec | 125 ++++++++++++++++++ sources | 1 + 4 files changed, 183 insertions(+) create mode 100644 Install-headers-into-a-versioned-directory.patch create mode 100644 grantlee-qt5.spec diff --git a/.gitignore b/.gitignore index e69de29..749dd95 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/grantlee-5.0.0.tar.gz diff --git a/Install-headers-into-a-versioned-directory.patch b/Install-headers-into-a-versioned-directory.patch new file mode 100644 index 0000000..0d1bb40 --- /dev/null +++ b/Install-headers-into-a-versioned-directory.patch @@ -0,0 +1,56 @@ +From dfd59ab11a5421c81b83f74d15e2e493dbc3b71b Mon Sep 17 00:00:00 2001 +From: Heiko Becker +Date: Sun, 18 Jan 2015 12:33:06 +0100 +Subject: [PATCH] Install headers into a versioned directory + +Allowing to co-install grantlee-0.5 and grantlee-5. +--- + CMakeLists.txt | 2 +- + templates/lib/CMakeLists.txt | 3 +++ + textdocument/lib/CMakeLists.txt | 3 +++ + 3 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 45f8673..4c0a8a5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -94,7 +94,7 @@ set (LIB_SUFFIX "" CACHE STRING "Define suffix of library directory name (eg. '6 + set( LIB_INSTALL_DIR lib${LIB_SUFFIX} ) + set( PLUGIN_INSTALL_DIR lib${LIB_SUFFIX}/grantlee/${Grantlee_MAJOR_MINOR_VERSION_STRING} ) + set( BIN_INSTALL_DIR bin ) +-set( INCLUDE_INSTALL_DIR include ) ++set( INCLUDE_INSTALL_DIR include/Grantlee5 ) + set( DATA_INSTALL_DIR share/apps ) + + # set up RPATH/install_name_dir +diff --git a/templates/lib/CMakeLists.txt b/templates/lib/CMakeLists.txt +index 789205c..3b2d08a 100644 +--- a/templates/lib/CMakeLists.txt ++++ b/templates/lib/CMakeLists.txt +@@ -79,6 +79,9 @@ add_library(Grantlee5::Templates ALIAS Grantlee_Templates) + generate_export_header(Grantlee_Templates) + set_property(TARGET Grantlee_Templates PROPERTY EXPORT_NAME Templates) + target_include_directories(Grantlee_Templates PRIVATE ../scriptabletags) ++target_include_directories(Grantlee_Templates ++ INTERFACE "$" ++) + + if (BUILD_TESTS) + set(GRANTLEE_TESTS_EXPORT "GRANTLEE_TEMPLATES_EXPORT") +diff --git a/textdocument/lib/CMakeLists.txt b/textdocument/lib/CMakeLists.txt +index 14163db..c9ee757 100644 +--- a/textdocument/lib/CMakeLists.txt ++++ b/textdocument/lib/CMakeLists.txt +@@ -25,6 +25,9 @@ generate_export_header(Grantlee_TextDocument) + add_library(Grantlee::TextDocument ALIAS Grantlee_TextDocument) + set_property(TARGET Grantlee_TextDocument PROPERTY EXPORT_NAME TextDocument) + ++target_include_directories(Grantlee_TextDocument ++ INTERFACE "$" ++) + + target_link_libraries(Grantlee_TextDocument + LINK_PUBLIC Qt5::Gui +-- +2.3.5 + diff --git a/grantlee-qt5.spec b/grantlee-qt5.spec new file mode 100644 index 0000000..87851eb --- /dev/null +++ b/grantlee-qt5.spec @@ -0,0 +1,125 @@ + +%define apidocs 1 + +Name: grantlee-qt5 +Summary: Qt5 string template engine based on the Django template system +Version: 5.0.0 +Release: 2%{?dist} + +License: LGPLv2+ +URL: https://github.com/steveire/grantlee +Source0: http://downloads.grantlee.org/grantlee-%{version}%{?pre:-%{pre}}.tar.gz + +## upstreamable patches +# Install headers into a versioned directory to be parallel-installable +# https://github.com/steveire/grantlee/pull/1 +Patch1: Install-headers-into-a-versioned-directory.patch + +BuildRequires: cmake >= 2.8.12 +BuildRequires: pkgconfig(Qt5Gui) +BuildRequires: pkgconfig(Qt5Script) +BuildRequires: pkgconfig(Qt5Test) +# qt5-linguist, when ready +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} +Requires: cmake +%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 +%autosetup -p1 -n grantlee-%{version} + + +%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 + + +%check +export CTEST_OUTPUT_ON_FAILURE=1 +xvfb-run -a make test -C %{_target_platform} + + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%license COPYING.LIB +%doc AUTHORS CHANGELOG README +%{_libdir}/libGrantlee_Templates.so.5* +%{_libdir}/libGrantlee_TextDocument.so.5* +%dir %{_libdir}/grantlee/ +%{_libdir}/grantlee/5.0/ + +%files devel +%{_includedir}/Grantlee5/ +%{_libdir}/libGrantlee_Templates.so +%{_libdir}/libGrantlee_TextDocument.so +%{_libdir}/cmake/Grantlee5/ + +%if 0%{?apidocs} +%files apidocs +%{_docdir}/HTML/en/Grantlee5/ +%endif + + +%changelog +* Sat Aug 08 2015 Rex Dieter 5.0.0-2 +- update URL + +* Thu May 28 2015 Rex Dieter 5.0.0-1 +- grantlee-5.0.0 diff --git a/sources b/sources index e69de29..2575e80 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +feb7f82d08e046fe078ea475dee710f6 grantlee-5.0.0.tar.gz