Skip to content

Commit bfcbcb8

Browse files
committed
Add chromium support
WE2-927 Signed-off-by: Raul Metsma <raul@metsma.ee>
1 parent 083c77e commit bfcbcb8

File tree

4 files changed

+27
-26
lines changed

4 files changed

+27
-26
lines changed

.github/workflows/cmake-linux-fedora.yml

+4-9
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,10 @@ env:
1111
jobs:
1212
build:
1313
runs-on: ubuntu-latest
14-
container: ${{ matrix.container }}
14+
container: fedora:${{ matrix.container }}
1515
strategy:
1616
matrix:
17-
container: ['fedora:38', 'fedora:39']
18-
include:
19-
- container: 'fedora:38'
20-
name: fedora38
21-
- container: 'fedora:39'
22-
name: fedora39
17+
container: [38, 39, 40]
2318

2419
steps:
2520
- name: Install Deps
@@ -30,12 +25,12 @@ jobs:
3025
submodules: recursive
3126

3227
- name: Configure CMake
33-
run: cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=/usr -B build -S .
28+
run: cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_SYSCONFDIR=/etc -B build -S .
3429

3530
- name: Build
3631
run: cmake --build build --config $BUILD_TYPE --target package
3732

3833
- uses: actions/upload-artifact@v4
3934
with:
40-
name: web-eid-app-fedora-build-${{matrix.name}}-${{github.run_number}}
35+
name: web-eid-app-fedora-build-fedora${{matrix.container}}-${{github.run_number}}
4136
path: build/*rpm

.github/workflows/cmake-linux-ubuntu.yml

+13-15
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,25 @@ env:
88
QT_QPA_PLATFORM: offscreen
99
DEBIAN_FRONTEND: noninteractive
1010
DEBFULLNAME: GitHub build
11-
DEBEMAIL: github-action@github
11+
DEBEMAIL: github-action@github.com
1212
CMAKE_BUILD_PARALLEL_LEVEL: 3
1313

1414
jobs:
1515
build:
1616
runs-on: ubuntu-latest
17-
container: ${{matrix.container}}
17+
container: ubuntu:${{matrix.container}}
1818
strategy:
1919
matrix:
20-
container: ['ubuntu:20.04', 'ubuntu:22.04']
21-
include:
22-
- container: 'ubuntu:20.04'
23-
name: ubuntu2004
24-
- container: 'ubuntu:22.04'
25-
name: ubuntu2204
20+
container: ['20.04', '22.04', '24.04']
2621

2722
steps:
2823
- name: Install dependencies
29-
if: matrix.container == 'ubuntu:20.04'
30-
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
24+
if: matrix.container == '20.04'
25+
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
3126

3227
- name: Install dependencies
33-
if: matrix.container != 'ubuntu:20.04'
34-
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
28+
if: matrix.container != '20.04'
29+
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
3530

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

4947
- uses: actions/upload-artifact@v4
5048
with:
51-
name: web-eid-app-ubuntu-build-${{matrix.name}}-${{github.run_number}}
52-
path: build/src/app/*.*deb
49+
name: web-eid-app-ubuntu-build-ubuntu${{matrix.container}}-${{github.run_number}}
50+
path: build/*.*deb

debian/web-eid-chrome.install

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
usr/share/web-eid/eu.webeid.json
2-
usr/share/google-chrome/extensions/ncibgoaomkmdpilpocfeponihegamlic.json
2+
usr/share/google-chrome/extensions/ncibgoaomkmdpilpocfeponihegamlic.json
3+
usr/share/chromium/extensions/ncibgoaomkmdpilpocfeponihegamlic.json
4+
etc/chromium/native-messaging-hosts/eu.webeid.json

src/app/CMakeLists.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ else()
158158
endif()
159159
set(WEBEID_PATH ${CMAKE_INSTALL_FULL_BINDIR}/web-eid)
160160
install(TARGETS web-eid DESTINATION ${CMAKE_INSTALL_BINDIR})
161-
if(EXISTS "/etc/debian_version")
161+
if(EXISTS /etc/debian_version)
162162
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eu.webeid.firefox.json
163163
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/mozilla/native-messaging-hosts RENAME eu.webeid.json)
164164
else()
@@ -167,8 +167,14 @@ else()
167167
endif()
168168
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eu.webeid.json
169169
DESTINATION ${CMAKE_INSTALL_DATADIR}/web-eid)
170+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eu.webeid.json
171+
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/chromium/native-messaging-hosts)
172+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eu.webeid.json
173+
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/opt/chrome/native-messaging-hosts)
170174
install(FILES ${CMAKE_SOURCE_DIR}/install/ncibgoaomkmdpilpocfeponihegamlic.json
171175
DESTINATION ${CMAKE_INSTALL_DATADIR}/google-chrome/extensions)
176+
install(FILES ${CMAKE_SOURCE_DIR}/install/ncibgoaomkmdpilpocfeponihegamlic.json
177+
DESTINATION ${CMAKE_INSTALL_DATADIR}/chromium/extensions)
172178
install(FILES ${CMAKE_SOURCE_DIR}/install/web-eid.desktop
173179
DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
174180
if (BUNDLE_XPI)

0 commit comments

Comments
 (0)