# Maintainer: Aqua-sama pkgname=smolbote-git pkgdesc='Yet another no-frills browser' pkgver=0 pkgrel=1 url="https://neueland.iserlohn-fortress.net/gitea/smolbote" install="smolbote.install" arch=('x86_64') license=('GPL3') depends=('qt5-webengine>=5.11.0' 'spdlog') optdepends=('firejail: launch a sandboxed instance') makedepends=('git' 'meson' 'python-kconfiglib' 'openssl' 'qt5-tools' 'scdoc') # use git+file:///path/to/your/repo to build from a local repo source=("git+https://neueland.iserlohn-fortress.net/gitea/aqua/smolbote.git" "git+https://github.com/itay-grudev/SingleApplication.git" "git+https://github.com/Taywee/args") sha512sums=('SKIP' 'SKIP' 'SKIP') #validgpgkeys=(BB1C090188E3E32B375C13FD095DE26BC16D2E98) # Aqua-sama ## Build Options # Enable plugin signing: # meson/ninja will generate the privateKey.pem and publicKey.pem in the $builddir # Because this embeds the public key into the executable, enabling this option will break reproducible builds. _signPlugins= prepare() { cd $srcdir/smolbote git submodule init git config submodule.3rd-party/SingleApplication/SingleApplication.git.url $srcdir/SingleApplication git submodule update 3rd-party/SingleApplication/SingleApplication.git git config submodule.3rd-party/args/args.git.url $srcdir/args git submodule update 3rd-party/args/args.git } 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() { if [ ! -d $srcdir/build ]; then mkdir $srcdir/build fi cd $srcdir/smolbote # 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. # --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 --buildtype=plain --wrap-mode=nodownload \ --prefix=/usr/local --auto-features=disabled \ -Db_pie=true -Db_lto=true -Dcpp_link_args="-fuse-ld=gold" \ -Dmanpage=enabled \ $srcdir/build # uncomment to enable crashhandler #meson configure -Dcrashhandler=enabled $srcdir/build #KCONFIG_CONFIG=linux/.config setconfig USEBREAKPAD=y # Run menuconfig #KCONFIG_CONFIG=linux/.config menuconfig # Build ninja -C $srcdir/build } package() { # Install cd $srcdir/build DESTDIR="$pkgdir" ninja install if [ -n $_signPlugins ]; then msg "Signing plugins" for so in $pkgdir/usr/local/lib/smolbote/plugins/*.so; do openssl dgst -sha256 -sign $srcdir/build/privateKey.pem -out $so.sig $so # If the sigs were in another location, use #install -m644 -t $pkgdir/usr/local/lib/smolbote/plugins $so.sig done fi # _signPlugins }