diff options
Diffstat (limited to 'linux')
| -rw-r--r-- | linux/makepkg/PKGBUILD | 29 | 
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  } | 
