1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
3 # Contributor: Geoffroy Carrier <geoffroy.carrier@aur.archlinux.org>
4 # Contributor: Eric Belanger <belanger@astro.umontreal.ca>
5 # Contributor: aeolist <aeolist@hotmail.com>
6 # Contributor: Gabriel Rauter <rauter.gabriel@gmail.com>
9 pkgname=(sysprof libsysprof-capture)
12 pkgdesc="Kernel based performance profiler"
13 url="https://wiki.gnome.org/Apps/Sysprof"
25 _commit=94a6aff06a4cfb91d6ad396e1cb703c4613b143f # tags/3.48.0^0
27 "git+https://gitlab.gnome.org/GNOME/sysprof.git#commit=$_commit"
33 git describe --tags | sed 's/^sysprof-//;s/[^-]*-g/r&/;s/-/+/g'
41 # Ensure static library is non-LTO compatible
42 CFLAGS+=" -ffat-lto-objects"
44 arch-meson sysprof build
45 meson compile -C build
49 meson test -C build --print-errorlogs
53 local p="$1" f d; shift
55 d="$srcdir/$p/${f#$pkgdir/}"
56 mkdir -p "$(dirname "$d")"
58 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
63 depends+=(libsysprof-capture)
66 meson install -C build --destdir "$pkgdir"
70 _pick capture usr/lib/libsysprof-capture-*
71 _pick capture usr/lib/pkgconfig/sysprof-capture-*
72 _pick capture usr/include/sysprof-*/sysprof-{address,capture,clock,collector,macros}.h
73 _pick capture usr/include/sysprof-*/sysprof-{platform,version,version-macros}.h
74 _pick capture usr/include/sysprof-*/sysprof-capture-{condition,cursor,reader,types,writer}.h
77 package_libsysprof-capture() {
78 pkgdesc+=" - capture library"
82 mv capture/* "$pkgdir"
84 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 \
85 sysprof/src/libsysprof-capture/COPYING
88 # vim:set sw=2 sts=-1 et: