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