forked from shownb/FBrowser
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuild_debian_packages
More file actions
executable file
·60 lines (55 loc) · 2.52 KB
/
build_debian_packages
File metadata and controls
executable file
·60 lines (55 loc) · 2.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
# Simple hackish script for deb generation on debian systems, it should be nice but it is not
# No one should use it seriously, thanks for understanding
# (c) 2022 e1z0
DIR=${PWD}
PACKAGES=${DIR}/debian
PACK_VER="1.0.0"
build_target () {
REL="$1"
ARCHx="$2"
CMK="-DFULLBROWSER=true"
PNAME="fbrowser-bin"
if [[ "$3" == "kiosk" ]]; then
PNAME="fbrowser-bin-kiosk"
CMK=""
fi
# hard dependency walking around different distro releases
DEPS="libc6 (>= 2.2.5), libgcc-s1 (>= 3.0), libqt5core5a (>= 5.15.1), libqt5gui5 (>= 5.0.2) | libqt5gui5-gles (>= 5.0.2), libqt5network5 (>= 5.0.2), libqt5webenginewidgets5 (>= 5.7.1), libqt5widgets5 (>= 5.0.2), libstdc++6 (>= 5)"
if [ "$REL" == "bookworm" ]; then
DEPS="libc6 (>= 2.34), libgcc-s1 (>= 3.0), libqt5core5a (>= 5.15.1), libqt5gui5 (>= 5.0.2) | libqt5gui5-gles (>= 5.0.2), libqt5network5 (>= 5.0.2), libqt5webenginewidgets5 (>= 5.7.1), libqt5widgets5 (>= 5.0.2), libstdc++6 (>= 5)"
fi
DEB_DESCR=$(cat <<-END
Package: ${PNAME}
Version: ${PACK_VER}
Architecture: ${ARCHx}
Maintainer: e1z0 <e1z0@eofnet.lt>
Depends: ${DEPS}
Description: Linux framebuffer based browser
There are two versions of this browser fbrowser (full featured browser for linuxfb) and fbrowser in kiosk mode
browser is based on qwebengine supports html5 and newer web standards most suitable for people who hate to use X server.
END
)
docker run --rm --name debian_${REL}_${ARCHx}_buildbot -v ${DIR}:/source -v ${PACKAGES}:/deb ${ARCHx}/debian:${REL} \
bash -c "apt-get -y update && apt-get -y install cmake build-essential gcc g++ qtwebengine5-dev&& \
if [ ! -d /source/build ]; then mkdir /source/build; fi && cd /source/build && \
cmake ${CMK} .. && make && mkdir -p ${PNAME}_${PACK_VER}_${ARCHx}/DEBIAN && mkdir -p ${PNAME}_${PACK_VER}_${ARCHx}/usr/local/bin && \
cp FBrowser ${PNAME}_${PACK_VER}_${ARCHx}/usr/local/bin/${PNAME} && \
cp ../fbrowser ${PNAME}_${PACK_VER}_${ARCHx}/usr/local/bin/ && \
echo \"$DEB_DESCR\" > ${PNAME}_${PACK_VER}_${ARCHx}/DEBIAN/control && \
mkdir -p debian && touch debian/control && \
dpkg-shlibdeps -O ${PNAME}_${PACK_VER}_${ARCHx}/usr/local/bin/${PNAME} && \
dpkg-deb --build --root-owner-group ${PNAME}_${PACK_VER}_${ARCHx} && \
mkdir -p /deb/${REL} && mv *.deb /deb/${REL} && \
if [ -d /source/build ]; then rm -r /source/build; fi \
"
}
# release arch
build_target bullseye i386
build_target bullseye amd64
build_target bullseye i386 kiosk
build_target bullseye amd64 kiosk
build_target bookworm i386
build_target bookworm amd64
build_target bookworm i386 kiosk
build_target bookworm amd64 kiosk