[packages/qdigidoc] add sandbox-compilation.patch from fedora
glen
glen at pld-linux.org
Mon Sep 18 23:31:01 CEST 2017
commit 1d3247b75cd845e3215e6d6b1f09d61deb60da0e
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Tue Sep 19 00:17:29 2017 +0300
add sandbox-compilation.patch from fedora
to build without network access
TSL.qrc | 1 +
config.qrc | 7 +++++++
qdigidoc.spec | 24 +++++++++++++++++++++++-
sandbox-compilation.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 75 insertions(+), 1 deletion(-)
---
diff --git a/qdigidoc.spec b/qdigidoc.spec
index 6debe7b..ef3645f 100644
--- a/qdigidoc.spec
+++ b/qdigidoc.spec
@@ -7,7 +7,20 @@ License: LGPL v2+
Group: X11/Applications
Source0: https://github.com/open-eid/qdigidoc/releases/download/v%{version}/%{name}-%{version}.tar.gz
# Source0-md5: b0a989d846f76901bc2951e17622fe12
+Source1: https://id.eesti.ee/config.json
+# Source1-md5: 63f710daa62f532d9d43d4631e431295
+Source2: https://id.eesti.ee/config.rsa
+# Source2-md5: d3b47de630a20013a8bab464045b5607
+Source3: https://id.eesti.ee/config.pub
+# Source3-md5: b3931bf5a8a2f19cb00e53afd89e440d
+Source4: TSL.qrc
+Source5: config.qrc
+Source6: tl-mp.xml
+# Source6-md5: 11235a4b7e7fbe7a5f5851e5c33ecc34
+Source7: EE.xml
+# Source7-md5: e15d2f875b47365970ced4697843e7c1
Patch0: desktop.patch
+Patch1: sandbox-compilation.patch
URL: https://github.com/open-eid/
BuildRequires: Qt5Core-devel >= %{qtver}
BuildRequires: Qt5Gui-devel >= %{qtver}
@@ -60,9 +73,18 @@ This package contains the qdigidoc extension for Konqueror.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
+
+install -d build/{common,client}
+cp %{SOURCE1} build/common
+cp %{SOURCE2} build/common
+cp %{SOURCE3} build/common
+cp %{SOURCE4} build/client
+cp %{SOURCE5} build/common
+cp %{SOURCE6} build/client
+cp %{SOURCE7} build/client
%build
-install -d build
cd build
%cmake \
%ifarch %{arm} %{ix86} %{x8664}
diff --git a/TSL.qrc b/TSL.qrc
new file mode 100644
index 0000000..3039f50
--- /dev/null
+++ b/TSL.qrc
@@ -0,0 +1 @@
+<RCC><qresource prefix="TSL"><file>tl-mp.xml</file><file>EE.xml</file></qresource></RCC>
diff --git a/config.qrc b/config.qrc
new file mode 100644
index 0000000..a12552c
--- /dev/null
+++ b/config.qrc
@@ -0,0 +1,7 @@
+<RCC>
+ <qresource prefix="/" >
+ <file >config.json</file>
+ <file >config.rsa</file>
+ <file >config.pub</file>
+ </qresource>
+</RCC>
diff --git a/sandbox-compilation.patch b/sandbox-compilation.patch
new file mode 100644
index 0000000..968ab50
--- /dev/null
+++ b/sandbox-compilation.patch
@@ -0,0 +1,44 @@
+diff -Naur qdigidoc-3.12.2_orig/client/CMakeLists.txt qdigidoc-3.12.2_patched/client/CMakeLists.txt
+--- qdigidoc-3.12.2_orig/client/CMakeLists.txt 2016-07-10 10:42:40.000000000 +0300
++++ qdigidoc-3.12.2_patched/client/CMakeLists.txt 2016-07-10 13:00:07.208755715 +0300
+@@ -1,14 +1,5 @@
+ set_app_name( PROGNAME qdigidocclient )
+
+-add_executable( TSLDownload TSLDownload.cpp )
+-target_link_libraries( TSLDownload Qt5::Network )
+-add_custom_command(
+- OUTPUT TSL.qrc tl-mp.xml EE.xml
+- DEPENDS TSLDownload
+- COMMAND $<TARGET_FILE:TSLDownload> "${CMAKE_CURRENT_BINARY_DIR}" EE
+- WORKING_DIRECTORY ${_qt5Core_install_prefix}/bin
+-)
+-
+ add_definitions( -DPKCS11_MODULE="${PKCS11_MODULE}" )
+ include_directories( ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/common ${OPENSSL_INCLUDE_DIR} )
+
+@@ -58,6 +49,7 @@
+ Qt5::PrintSupport
+ ${LIBDIGIDOCPP_LIBRARY}
+ ${ADDITIONAL_LIBRARIES}
++ pthread
+ )
+
+ if( APPLE )
+diff -Naur qdigidoc-3.12.2_orig/common/CMakeLists.txt qdigidoc-3.12.2_patched/common/CMakeLists.txt
+--- qdigidoc-3.12.2_orig/common/CMakeLists.txt 2016-07-10 10:42:42.000000000 +0300
++++ qdigidoc-3.12.2_patched/common/CMakeLists.txt 2016-07-10 13:02:48.969572573 +0300
+@@ -19,13 +19,8 @@
+ endif()
+ add_definitions( -DCONFIG_URL="${CONFIG_URL}" )
+ list( APPEND SOURCES Configuration.cpp )
+- file( DOWNLOAD ${CONFIG_URL} ${CMAKE_CURRENT_BINARY_DIR}/config.json )
+- string( REPLACE ".json" ".rsa" RSA_URL ${CONFIG_URL} )
+- file( DOWNLOAD ${RSA_URL} ${CMAKE_CURRENT_BINARY_DIR}/config.rsa )
+- string( REPLACE ".json" ".pub" PUB_URL ${CONFIG_URL} )
+- file( DOWNLOAD ${PUB_URL} ${CMAKE_CURRENT_BINARY_DIR}/config.pub )
+- configure_file( config.qrc config.qrc COPYONLY )
+ qt5_add_resources( SOURCES ${CMAKE_CURRENT_BINARY_DIR}/config.qrc )
++ list( APPEND RC_FILES config.qrc )
+ endif()
+
+ if( WIN32 )
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/qdigidoc.git/commitdiff/1d3247b75cd845e3215e6d6b1f09d61deb60da0e
More information about the pld-cvs-commit
mailing list