archrelease: copy trunk to extra-x86_64
[arch-packages.git] / sysprof / repos / extra-x86_64 / PKGBUILD
blob153a8e126c0a7802ea52fd115a6ad86ab190601a
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>
8 pkgbase=sysprof
9 pkgname=(sysprof libsysprof-capture)
10 pkgver=3.48.0
11 pkgrel=1
12 pkgdesc="Kernel based performance profiler"
13 url="https://wiki.gnome.org/Apps/Sysprof"
14 license=(GPL)
15 arch=(x86_64)
16 depends=(
17   libadwaita
18   polkit
20 makedepends=(
21   git
22   meson
23   yelp-tools
25 _commit=94a6aff06a4cfb91d6ad396e1cb703c4613b143f  # tags/3.48.0^0
26 source=(
27   "git+https://gitlab.gnome.org/GNOME/sysprof.git#commit=$_commit"
29 b2sums=('SKIP')
31 pkgver() {
32   cd sysprof
33   git describe --tags | sed 's/^sysprof-//;s/[^-]*-g/r&/;s/-/+/g'
36 prepare() {
37   cd sysprof
40 build() {
41   # Ensure static library is non-LTO compatible
42   CFLAGS+=" -ffat-lto-objects"
44   arch-meson sysprof build
45   meson compile -C build
48 check() {
49   meson test -C build --print-errorlogs
52 _pick() {
53   local p="$1" f d; shift
54   for f; do
55     d="$srcdir/$p/${f#$pkgdir/}"
56     mkdir -p "$(dirname "$d")"
57     mv "$f" "$d"
58     rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
59   done
62 package_sysprof() {
63   depends+=(libsysprof-capture)
64   groups=(gnome-extra)
66   meson install -C build --destdir "$pkgdir"
68   cd "$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"
79   depends=()
80   license=(BSD)
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: