aboutsummaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
Diffstat (limited to 'linux')
-rw-r--r--linux/makepkg/PKGBUILD4
-rw-r--r--linux/poi.desktop6
2 files changed, 9 insertions, 1 deletions
diff --git a/linux/makepkg/PKGBUILD b/linux/makepkg/PKGBUILD
index e1ce4c8..d0e3b7f 100644
--- a/linux/makepkg/PKGBUILD
+++ b/linux/makepkg/PKGBUILD
@@ -13,6 +13,7 @@ license=('GPL3')
replaces=('smolbote-git')
depends=('qt5-webengine>=5.10.1' 'boost-libs>=1.66.0')
+optdepends=('firejail: launch a sandboxed instance')
makedepends=('mercurial' 'cmake' 'pkg-config' 'ninja')
# this is the central repository
@@ -94,6 +95,9 @@ package() {
install -Dm644 "${srcdir}/smolbote-hg/data/poi.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/poi.svg"
install -Dm644 "${srcdir}/smolbote-hg/linux/poi.desktop" "${pkgdir}/usr/share/applications/poi.desktop"
+ # firejail profile
+ install -Dm644 "${srcdir}/smolbote-hg/data/poi.profile" "${pkgdir}/usr/local/lib/smolbote/poi.profile"
+
# man page
_man_dir="$pkgdir/usr/local/man/man7"
test -d $_man_dir || mkdir -p $_man_dir
diff --git a/linux/poi.desktop b/linux/poi.desktop
index 92fd7f3..4b25ccc 100644
--- a/linux/poi.desktop
+++ b/linux/poi.desktop
@@ -10,8 +10,12 @@ Type=Application
MimeType=text/html;text/xml;application/xhtml+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
Categories=Network;WebBrowser;
Keywords=web;browser;internet;
-Actions=configure;
+Actions=configure;firejail
[Desktop Action configure]
Name=Configure smolbote
Exec=/usr/local/bin/poi-config %u
+
+[Desktop Action firejail]
+Name=Start instance in firejail
+Exec=/usr/bin/firejail --profile=/usr/local/lib/smolbote/poi.profile poi --socket=/tmp/smolbote-firejail.socket