]> git.pld-linux.org Git - packages/qdigidoc.git/commitdiff
add sandbox-compilation.patch from fedora auto/th/qdigidoc-3.12.6-1
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 18 Sep 2017 21:17:29 +0000 (00:17 +0300)
committerElan Ruusamäe <glen@pld-linux.org>
Mon, 18 Sep 2017 21:30:25 +0000 (00:30 +0300)
to build without network access

TSL.qrc [new file with mode: 0644]
config.qrc [new file with mode: 0644]
qdigidoc.spec
sandbox-compilation.patch [new file with mode: 0644]

diff --git a/TSL.qrc b/TSL.qrc
new file mode 100644 (file)
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 (file)
index 0000000..a12552c
--- /dev/null
@@ -0,0 +1,7 @@
+<RCC>
+  <qresource prefix="/" >
+    <file >config.json</file>
+    <file >config.rsa</file>
+    <file >config.pub</file>
+  </qresource>
+</RCC>
index 6debe7bd22709e4a509f35875a4eca2b5267c86e..ef3645f3de60e48cd4634b670de74aead9b50c09 100644 (file)
@@ -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/sandbox-compilation.patch b/sandbox-compilation.patch
new file mode 100644 (file)
index 0000000..968ab50
--- /dev/null
@@ -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 )
This page took 0.290704 seconds and 4 git commands to generate.