# Maintainer: Aqua-sama ## not-use flags # Enable plugin signing: _signPlugins=0 # test _test=0 _branch=devel _optimized=0 # install prefix _prefix='/usr' pkgname=smolbote-git pkgdesc='Yet another no-frills browser' pkgver=r638.be627c1 pkgrel=1 url="https://neueland.iserlohn-fortress.net/gitea/smolbote" install="smolbote.install" arch=('x86_64' 'aarch64') license=('GPL3') depends=('qt6-svg' 'qt6-webengine' 'spdlog' 'fmt') makedepends=('git' 'meson' 'python-kconfiglib' 'openssl' 'qt6-tools' 'scdoc') optdepends=('firejail: launch a sandboxed instance') # this isn't a hard requirement, simply a workaround as the build script # sets some additional hardening flags that the default makepkg.conf # will turn down options=(!buildflags) # use git+file:///path/to/your/repo to build from a local repo source=("git+https://neueland.iserlohn-fortress.net/cgit/smolbote" "https://github.com/itay-grudev/SingleApplication/archive/refs/tags/v3.5.1.tar.gz" "https://neueland.iserlohn-fortress.net/releases/args.hxx-6.2.2.tar.xz"{,.sig}) if [ $_optimized == "1" ]; then source+=(meson.build.diff) fi b2sums=('SKIP' '924cef0b6aeb76aace3444f46141acb58c5f5019e1e09c78e1b1d973f1689283b5f5f7612dc58dc542fc04364197128f2f3f9e1a97b8b78e704fae5d995a8eca' '440e357006883fbf1b1a796051500a6b068858a35947cd1119767bed8e0a86a7db4aff16498934d7217c375fe643da03c22007e438f30899e247153f25c922b6' 'SKIP') validpgpkeys=('BB1C090188E3E32B375C13FD095DE26BC16D2E98') prepare() { mkdir "$srcdir/smolbote/subprojects/packagecache/" ln -s "$srcdir/SingleApplication-3.5.1" "$srcdir/smolbote/subprojects/" ln -s "$srcdir/args.hxx-6.2.2" "$srcdir/smolbote/subprojects/" cd $srcdir/smolbote if [ $_test == "1" ]; then git checkout ${_branch} fi KCONFIG_CONFIG=linux/.config alldefconfig if [ $_optimized == "1" ]; then patch -p1 -i ${srcdir}/meson.build.diff fi } pkgver() { cd smolbote # Without version tag echo r$(git rev-list --count HEAD)-$(git rev-parse --short HEAD) | sed 's/\([^-]*-g\)/r\1/;s/-/./g' } build() { mkdir -p $srcdir/build # For a list of configureable options, check smolbote/meson_options.txt, or run `meson configure` in $srcdir/build # --wrap-mode=nodownload - disable meson from downloading dependency wraps. This will cause it to fail if makedepends are not found by pkg-config or cmake. # --wrap-mode=nofallback - disable downloads as a fallback too. Implies --wrap-mode=nodownload # --buildtype=plain - meson won't add any flags to the command line # --prefix=... - install prefix # --auto-features=disabled - features should be explicitly enabled # b_pie: Build executables as position independent # b_lto: Use link time optimization meson setup \ --buildtype=plain --prefix=$_prefix --wrap-mode=nodownload --auto-features=disabled \ -Db_pie=true -Ddefault_library=static \ -Dmanpage=true \ $srcdir/smolbote $srcdir/build # Build ninja -C $srcdir/build "$MAKEFLAGS" } #check() { # ninja -C $srcdir/build test #} package() { # Install cd $srcdir/build DESTDIR="$pkgdir" ninja install if [ $_signPlugins == "1" ]; then msg "Signing plugins" for so in $pkgdir/$_prefix/lib/smolbote/plugins/*.so; do openssl dgst -sha256 -sign $srcdir/build/lib/pluginloader/privateKey.pem -out $so.sig $so msg2 "Signed $(basename $so)" done fi }