summaryrefslogtreecommitdiff
path: root/manualPorts/pax-utils/Pkgfile
blob: bb868f051ff5df6d69bb8ef91cdc1fc74790a68a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Description: ELF utils that can check files for security relevant properties
# URL: https://wiki.gentoo.org/wiki/Hardened/PaX_Utilities
# Maintainer: Erich Eckner, crux at eckner dot net
# Depends on: bash libcap libseccomp meson python3 python3-pyelftools

name=pax-utils
version=1.3.6
release=1
source=("https://github.com/gentoo/$name/archive/refs/tags/v$version.tar.gz")

build() {

    sed -E '
      1 s|python$|\03|
      s|(  paths =) \[\]|\1 ["/usr/lib"]|g
    ' -i $name-$version/lddtree.py

    meson setup \
      --prefix /usr \
      --libexecdir lib \
      --buildtype plain \
      --auto-features enabled \
      --wrap-mode nodownload \
      -D b_lto=true \
      -D b_pie=true \
      $name-$version build -Duse_seccomp=true
    meson compile -C build
    meson install -C build --destdir "$PKG"

}