aboutsummaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2020-01-03 21:58:20 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2020-01-03 23:28:39 +0200
commit0642a0910ca0fb8e392636254684b91637a7b542 (patch)
tree4fa4328fcdf205b80103d5255ea1570439b46cce /linux
parentMerge some QoL improvements from staging branch (diff)
downloadsmolbote-0642a0910ca0fb8e392636254684b91637a7b542.tar.xz
PKGBUILD: add install stage for debug symbols
- make toggling breakpad work properly
Diffstat (limited to 'linux')
-rw-r--r--linux/makepkg/PKGBUILD29
1 files changed, 19 insertions, 10 deletions
diff --git a/linux/makepkg/PKGBUILD b/linux/makepkg/PKGBUILD
index debf2f1..59c7eee 100644
--- a/linux/makepkg/PKGBUILD
+++ b/linux/makepkg/PKGBUILD
@@ -26,11 +26,11 @@ sha512sums=('SKIP'
#validgpgkeys=(BB1C090188E3E32B375C13FD095DE26BC16D2E98) # Aqua-sama <aqua@iserlohn-fortress.net>
-## Build Options
+## not-use flags 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=
+# Enable breakpad integraton:
+_enableBreakpad=
prepare() {
cd $srcdir/smolbote
@@ -53,6 +53,7 @@ build() {
mkdir $srcdir/build
fi
cd $srcdir/smolbote
+ KCONFIG_CONFIG=linux/.config alldefconfig
# For a list of configureable options, check smolbote/meson_options.txt, or
# run `meson configure` in $srcdir/build
@@ -65,13 +66,15 @@ build() {
# 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" \
+ -Db_pie=true -Db_lto=true \
-Dmanpage=enabled \
$srcdir/build
- # uncomment to enable crashhandler
- #meson configure -Dcrashhandler=enabled $srcdir/build
- #KCONFIG_CONFIG=linux/.config setconfig USEBREAKPAD=y
+ if [ -n $_enableBreakpad ]; then
+ msg2 "Enabling crashhandler"
+ meson configure -Ddebug=true -Dcrashhandler=enabled $srcdir/build
+ KCONFIG_CONFIG=linux/.config setconfig USEBREAKPAD=y
+ fi
# Run menuconfig
#KCONFIG_CONFIG=linux/.config menuconfig
@@ -88,10 +91,16 @@ package() {
if [ -n $_signPlugins ]; then
msg "Signing plugins"
for so in $pkgdir/usr/local/lib/smolbote/plugins/*.so; do
+ msg2 "Signed $(basename $so)"
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
+ fi
+
+ if [ -n $_enableBreakpad ]; 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) }')
+ install -m644 -t $pkgdir/usr/local/lib/smolbote/symbols/poi/$(head -n1 linux/poi.sym | awk '{ print $(NF-1) }') $srcdir/build/linux/poi.sym
+ fi
}