From 8e32cfbe690b090e202f3cbf0ae10c9f7ae22d22 Mon Sep 17 00:00:00 2001 From: Raul Metsma Date: Mon, 29 Apr 2024 13:55:58 +0300 Subject: [PATCH] Add chromium support WE2-927 Signed-off-by: Raul Metsma --- .github/workflows/cmake-linux-fedora.yml | 13 ++++--------- debian/not-installed | 1 + debian/web-eid-chrome.install | 4 +++- src/app/CMakeLists.txt | 8 +++++++- 4 files changed, 15 insertions(+), 11 deletions(-) create mode 100644 debian/not-installed diff --git a/.github/workflows/cmake-linux-fedora.yml b/.github/workflows/cmake-linux-fedora.yml index 6dcfad26..854883f3 100644 --- a/.github/workflows/cmake-linux-fedora.yml +++ b/.github/workflows/cmake-linux-fedora.yml @@ -11,15 +11,10 @@ env: jobs: build: runs-on: ubuntu-latest - container: ${{ matrix.container }} + container: fedora:${{ matrix.container }} strategy: matrix: - container: ['fedora:38', 'fedora:39'] - include: - - container: 'fedora:38' - name: fedora38 - - container: 'fedora:39' - name: fedora39 + container: [38, 39, 40] steps: - name: Install Deps @@ -30,12 +25,12 @@ jobs: submodules: recursive - name: Configure CMake - run: cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=/usr -B build -S . + run: cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_SYSCONFDIR=/etc -B build -S . - name: Build run: cmake --build build --config $BUILD_TYPE --target package - uses: actions/upload-artifact@v4 with: - name: web-eid-app-fedora-build-${{matrix.name}}-${{github.run_number}} + name: web-eid-app-fedora-build-fedora${{matrix.container}}-${{github.run_number}} path: build/*rpm diff --git a/debian/not-installed b/debian/not-installed new file mode 100644 index 00000000..db29cd88 --- /dev/null +++ b/debian/not-installed @@ -0,0 +1 @@ +etc/opt/chrome/native-messaging-hosts/eu.webeid.json diff --git a/debian/web-eid-chrome.install b/debian/web-eid-chrome.install index 178f3789..038bf2e1 100644 --- a/debian/web-eid-chrome.install +++ b/debian/web-eid-chrome.install @@ -1,2 +1,4 @@ usr/share/web-eid/eu.webeid.json -usr/share/google-chrome/extensions/ncibgoaomkmdpilpocfeponihegamlic.json \ No newline at end of file +usr/share/google-chrome/extensions/ncibgoaomkmdpilpocfeponihegamlic.json +usr/share/chromium/extensions/ncibgoaomkmdpilpocfeponihegamlic.json +etc/chromium/native-messaging-hosts/eu.webeid.json diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index 7f3faf9f..773d7840 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -158,7 +158,7 @@ else() endif() set(WEBEID_PATH ${CMAKE_INSTALL_FULL_BINDIR}/web-eid) install(TARGETS web-eid DESTINATION ${CMAKE_INSTALL_BINDIR}) - if(EXISTS "/etc/debian_version") + if(EXISTS /etc/debian_version) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eu.webeid.firefox.json DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/mozilla/native-messaging-hosts RENAME eu.webeid.json) else() @@ -167,8 +167,14 @@ else() endif() install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eu.webeid.json DESTINATION ${CMAKE_INSTALL_DATADIR}/web-eid) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eu.webeid.json + DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/chromium/native-messaging-hosts) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eu.webeid.json + DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/opt/chrome/native-messaging-hosts) install(FILES ${CMAKE_SOURCE_DIR}/install/ncibgoaomkmdpilpocfeponihegamlic.json DESTINATION ${CMAKE_INSTALL_DATADIR}/google-chrome/extensions) + install(FILES ${CMAKE_SOURCE_DIR}/install/ncibgoaomkmdpilpocfeponihegamlic.json + DESTINATION ${CMAKE_INSTALL_DATADIR}/chromium/extensions) install(FILES ${CMAKE_SOURCE_DIR}/install/web-eid.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications) if (BUNDLE_XPI)