aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/makepkg/PKGBUILD44
1 files changed, 27 insertions, 17 deletions
diff --git a/linux/makepkg/PKGBUILD b/linux/makepkg/PKGBUILD
index d0748da..07eb25d 100644
--- a/linux/makepkg/PKGBUILD
+++ b/linux/makepkg/PKGBUILD
@@ -1,5 +1,15 @@
# Maintainer: Aqua-sama <aqua@iserlohn-fortress.net>
+
+## not-use flags Options
+# Enable plugin signing:
+_signPlugins=0
+# Enable breakpad integraton:
+_enableBreakpad=0
+# test
+_test=1
+
+
pkgname=smolbote-git
pkgdesc='Yet another no-frills browser'
pkgver=0
@@ -8,12 +18,16 @@ pkgrel=1
url="https://neueland.iserlohn-fortress.net/gitea/smolbote"
install="smolbote.install"
-arch=('x86_64')
+arch=('x86_64' 'aarch64')
license=('GPL3')
depends=('qt5-webengine>=5.11.0' 'spdlog')
+if [ $_enableBreakpad == "1" ]; then
+ makedepends=('git' 'meson' 'python-kconfiglib' 'openssl' 'qt5-tools' 'scdoc' 'breakpad-git')
+else
+ makedepends=('git' 'meson' 'python-kconfiglib' 'openssl' 'qt5-tools' 'scdoc')
+fi
optdepends=('firejail: launch a sandboxed instance')
-makedepends=('git' 'meson' 'python-kconfiglib' 'openssl' 'qt5-tools' 'scdoc' 'breakpad-git')
# use git+file:///path/to/your/repo to build from a local repo
source=("git+https://library.iserlohn-fortress.net/aqua/smolbote.git"
@@ -26,12 +40,6 @@ sha512sums=('SKIP'
#validgpgkeys=(BB1C090188E3E32B375C13FD095DE26BC16D2E98) # Aqua-sama <aqua@iserlohn-fortress.net>
-## not-use flags Options
-# Enable plugin signing:
-#_signPlugins=
-# Enable breakpad integraton:
-_enableBreakpad=
-
prepare() {
cd $srcdir/smolbote
@@ -49,9 +57,7 @@ pkgver() {
}
build() {
- if [ ! -d $srcdir/build ]; then
- mkdir $srcdir/build
- fi
+ mkdir -p $srcdir/build
cd $srcdir/smolbote
KCONFIG_CONFIG=linux/.config alldefconfig
@@ -59,20 +65,24 @@ build() {
# 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
+ export CFLAGS="$CFLAGS -O3 -fstack-protector-all -flto=4"
+ export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -flto=4"
+ export LDFLAGS="$LDFLAGS,-fuse-ld=gold"
meson --buildtype=plain --wrap-mode=nodownload \
--prefix=/usr/local --auto-features=disabled \
- -Db_pie=true -Db_lto=true \
+ -Db_pie=true \
-Dmanpage=enabled \
$srcdir/build
- if [ -n $_enableBreakpad ]; then
+ if [ $_enableBreakpad == "1" ]; then
msg2 "Enabling crashhandler"
- meson configure -Ddebug=true -Dcrashhandler=enabled $srcdir/build
+ meson configure -Ddebug=true -Dcrashhandler=enabled
KCONFIG_CONFIG=linux/.config setconfig USEBREAKPAD=y
fi
@@ -80,7 +90,7 @@ build() {
#KCONFIG_CONFIG=linux/.config menuconfig
# Build
- ninja -C $srcdir/build
+ ninja -C $srcdir/build "$MAKEFLAGS"
}
package() {
@@ -88,7 +98,7 @@ package() {
cd $srcdir/build
DESTDIR="$pkgdir" ninja install
- if [[ -v $_signPlugins ]]; then
+ if [ $_signPlugins == "1" ]; then
msg "Signing plugins"
for so in $pkgdir/usr/local/lib/smolbote/plugins/*.so; do
msg2 "Signed $(basename $so)"
@@ -96,7 +106,7 @@ package() {
done
fi
- if [[ -v $_enableBreakpad ]]; then
+ if [ $_enableBreakpad == "1" ]; then
msg "Installing debug symbols"
ninja -C $srcdir/build linux/poi.sym
install -dm644 $pkgdir/usr/local/lib/smolbote/symbols/poi/$(head -n1 linux/poi.sym | awk '{ print $(NF-1) }')