summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6064eb5c159c357ba2cb7abbefeb6d1eb8fb764a (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Maintainer: Alexandros Theodotou <alex@zrythm.org>
# `libgtop` Maintainer: Jan de Groot <jgc@archlinux.org>

_pkgbase=libgtop
pkgname=mingw-w64-libgtop
pkgver=2.40.0
pkgrel=5
pkgdesc="A library for collecting system monitoring data"
url="https://gitlab.gnome.org/GNOME/libgtop"
arch=(x86_64)
license=(LGPL)
options=('!libtool' '!strip' '!buildflags' '!makeflags')
depends=(mingw-w64-glib2)
makedepends=(gobject-introspection git)
_commit=abccaf488a929de1e95e6a748485575dec52c998  # tags/2.40.0^0
source=("git+https://gitlab.gnome.org/GNOME/libgtop.git#commit=$_commit")
sha256sums=('SKIP')

_architectures=('i686-w64-mingw32' 'x86_64-w64-mingw32')

#pkgver() {
  #cd "${srcdir}"

  #for _arch in "${_architectures[@]}"; do
    #pushd "build-${_arch}"

    #git describe --tags | sed 's/-/+/g'

    #popd
  #done
#}

prepare() {
  cd "${srcdir}"

  for _arch in "${_architectures[@]}"; do
    rm -rf build-${_arch}
    cp -r "${_pkgbase}" build-${_arch}
    pushd build-${_arch}

    NOCONFIGURE=1 ./autogen.sh

    popd
  done
}

build() {
  cd "${srcdir}"

  for _arch in "${_architectures[@]}"; do
    pushd "build-${_arch}"

    ${_arch}-configure --prefix=/usr \
        --localstatedir=/var --disable-static .
    make

    popd
  done
}

package() {
  cd "${srcdir}"

  for _arch in "${_architectures[@]}"; do
    pushd "build-${_arch}"

    make DESTDIR="$pkgdir" install

    popd
  done
}