From 76c671adc88fe3bcff3d9b206fa6679eec56e6b5 Mon Sep 17 00:00:00 2001 From: eidins <92649203+eidins@users.noreply.github.com> Date: Tue, 7 Dec 2021 13:38:25 +0200 Subject: [PATCH] Support Fedora (#997) * Adding deps install to README * Builds digidoc RPM successfully * Renaming libdigidocpp package for fedora * Don't need excludes in Fedora 34 * upload rpm * Update build.yml * Update build.yml * Update build.yml * Remove unneeded build deps * Adding qt5-linguist * Update .github/workflows/build.yml Co-authored-by: eidins <92649203+eidins@users.noreply.github.com> * Install Yaru theme workaround only on debian Signed-off-by: Raul Metsma * Revert "Install Yaru theme workaround only on debian" This reverts commit 945f5eabc9f36b5bf26d103ddcfceeaab2f6ffc5. * Update README.md Signed-off-by: Raul Metsma Co-authored-by: Aidan Macdonald Co-authored-by: Raul Metsma --- .github/workflows/build.yml | 44 +++++++++++++++++++++++++++++++++++++ CMakeLists.txt | 10 ++++++++- README.md | 3 +++ 3 files changed, 56 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2af854c43..d688e4e91 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -90,6 +90,50 @@ jobs: with: name: debs path: qdigidoc4*.* + fedora: + name: Build on Fedora to ${{ matrix.container }} + runs-on: ubuntu-latest + container: ${{ matrix.container }} + strategy: + matrix: + container: ['fedora:33'] + env: + MAKEFLAGS: -j3 + steps: + - name: Checkout + uses: actions/checkout@v1 + with: + submodules: recursive + - name: Install Build Deps + run: dnf groupinstall -y "Development Tools" "Development Libraries" fedora-packager + - name: Install Deps + run: | + dnf install -y \ + cmake openssl-devel vim-common qt5-qtsvg-devel qt5-linguist + - name: Download artifact + uses: dawidd6/action-download-artifact@v2 + with: + workflow: build.yml + branch: master + name: rpms + path: libdigidocpp-pkg + repo: 'open-eid/libdigidocpp' + - name: Install artifact + run: | + dnf install -y ./libdigidocpp-pkg/*$(lsb_release -rs)*.rpm + rm -rf libdigidocpp-pkg + - name: Build + run: | + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX=/usr .. + make + make package + - name: Archive artifacts + uses: actions/upload-artifact@v2 + with: + name: rpms + path: build/qdigidoc4*.rpm windows: name: Build on Windows runs-on: ${{ matrix.image }} diff --git a/CMakeLists.txt b/CMakeLists.txt index fe9a71f4a..73cd3d59f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,15 @@ set_env( MOBILEID_URL "https://dd-mid.ria.ee/mid-api" CACHE STRING "URL for Mobi set_env( SMARTID_URL "https://dd-sid.ria.ee/v1" CACHE STRING "URL for Smart-ID" ) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION YES) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG NO) - +set(CPACK_PACKAGE_VERSION ${VERSION}) +set(CPACK_GENERATOR "RPM") +set(CPACK_PACKAGE_NAME "qdigidoc4") +set(CPACK_PACKAGE_RELEASE 1) +set(CPACK_PACKAGE_CONTACT "Andrus Randveer") +set(CPACK_PACKAGE_VENDOR "RIA") +set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/") +set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}") +include(CPack) if(APPLE) add_subdirectory(extensions/DigiDocQL) elseif(WIN32) diff --git a/README.md b/README.md index e4e666fc8..0204c20d7 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,10 @@ * Install + # Ubuntu sudo apt install cmake qttools5-dev libqt5svg5-dev qttools5-dev-tools libpcsclite-dev libssl-dev libdigidocpp-dev libldap2-dev gettext pkg-config + # Fedora + sudo dnf install qt5-qttools-devel qt5-qtsvg-devel qt5-linguist pcsc-lite-devel openssl-devel libdigidocpp openldap-devel gettext pkg-config * Also runtime dependency opensc-pkcs11 and pcscd is needed