# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Jan de Groot <jgc@archlinux.org>
pkgname=libgtop
pkgver=2.41.3
pkgrel=2
pkgdesc='Library for collecting system monitoring data'
arch=('armv7h' 'aarch64')
url='https://gitlab.gnome.org/GNOME/libgtop'
license=('GPL-2.0-or-later')
depends=('glib2' 'glibc' 'libxau')
makedepends=('git' 'gobject-introspection' 'gtk-doc')
source=("git+https://gitlab.gnome.org/GNOME/$pkgname.git#tag=$pkgver")
b2sums=('ee017fd3b75d36f6617a6258ca6b65c83dbbdcbbd2bd6345326d7e321678d9529639303c65e98de3eae5a18f88ac6ccfc75ee287ee9647e329eba77c7bb7804c')
prepare() {
cd $pkgname
# Make the package reproducible
# https://gitlab.gnome.org/GNOME/libgtop/-/merge_requests/44
git cherry-pick -n 6370ad16e7dfcabd1485c2981a006f9cda90a878
NOCONFIGURE=1 ./autogen.sh
}
build() {
cd $pkgname
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
--enable-gtk-doc
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
package() {
cd $pkgname
make DESTDIR="$pkgdir" install
}