Skip to content

Commit

Permalink
Add chromium support
Browse files Browse the repository at this point in the history
WE2-927

Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma committed May 16, 2024
1 parent d3971f5 commit 81eefdb
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 26 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/cmake-linux-fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
28 changes: 13 additions & 15 deletions .github/workflows/cmake-linux-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,25 @@ env:
QT_QPA_PLATFORM: offscreen
DEBIAN_FRONTEND: noninteractive
DEBFULLNAME: GitHub build
DEBEMAIL: github-action@github
DEBEMAIL: github-action@github.com
CMAKE_BUILD_PARALLEL_LEVEL: 3

jobs:
build:
runs-on: ubuntu-latest
container: ${{matrix.container}}
container: ubuntu:${{matrix.container}}
strategy:
matrix:
container: ['ubuntu:20.04', 'ubuntu:22.04']
include:
- container: 'ubuntu:20.04'
name: ubuntu2004
- container: 'ubuntu:22.04'
name: ubuntu2204
container: ['20.04', '22.04', '24.04']

steps:
- name: Install dependencies
if: matrix.container == 'ubuntu:20.04'
run: apt update -qq && apt install --no-install-recommends -y git lsb-release fakeroot build-essential devscripts debhelper pkg-config cmake libpcsclite-dev libssl-dev libgtest-dev libqt5svg5-dev qttools5-dev-tools qttools5-dev
if: matrix.container == '20.04'
run: apt update -qq && apt install --no-install-recommends -y git lsb-release fakeroot build-essential devscripts debhelper lintian pkg-config cmake libpcsclite-dev libssl-dev libgtest-dev libqt5svg5-dev qttools5-dev-tools qttools5-dev

- name: Install dependencies
if: matrix.container != 'ubuntu:20.04'
run: apt update -qq && apt install --no-install-recommends -y git lsb-release fakeroot build-essential devscripts debhelper pkg-config cmake libpcsclite-dev libssl-dev libgtest-dev libgl-dev libqt6svg6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libqt6core5compat6-dev
if: matrix.container != '20.04'
run: apt update -qq && apt install --no-install-recommends -y git lsb-release fakeroot build-essential devscripts debhelper lintian pkg-config cmake libpcsclite-dev libssl-dev libgtest-dev libgl-dev libqt6svg6-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools libqt6core5compat6-dev

- uses: actions/checkout@v4
with:
Expand All @@ -44,9 +39,12 @@ jobs:
run: |
cmake --build build --config $BUILD_TYPE --target installer
# Debian creates artifacts outside of project dir, copy them back to make them available in the build artifacts
cp -r ../web-eid*.* build/src/app
mv ../web-eid*.* build
- name: Test package
run: lintian build/*.deb

- uses: actions/upload-artifact@v4
with:
name: web-eid-app-ubuntu-build-${{matrix.name}}-${{github.run_number}}
path: build/src/app/*.*deb
name: web-eid-app-ubuntu-build-ubuntu${{matrix.container}}-${{github.run_number}}
path: build/*.*deb
4 changes: 3 additions & 1 deletion debian/web-eid-chrome.install
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
usr/share/web-eid/eu.webeid.json
usr/share/google-chrome/extensions/ncibgoaomkmdpilpocfeponihegamlic.json
usr/share/google-chrome/extensions/ncibgoaomkmdpilpocfeponihegamlic.json
usr/share/chromium/extensions/ncibgoaomkmdpilpocfeponihegamlic.json
etc/chromium/native-messaging-hosts/eu.webeid.json
8 changes: 7 additions & 1 deletion src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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)
Expand Down

0 comments on commit 81eefdb

Please sign in to comment.