summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 912a29a80cf7a19bd323f7bd9ffce618b2e059dd (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
# Maintainer: Martin Cation <martincation@protonmail.com>
# Contributor: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: AndyRTR <andyrtr@archlinux.org>
# Contributor: Aurelien Foret <orelien@chez.com>

_pkgname=xfce4-cpugraph-plugin
pkgname=xfce4-memgraph-plugin
pkgver=1.2.5
pkgrel=1
pkgdesc="Graphical representation of the MEM load"
arch=('x86_64')
license=('GPL' 'custom')
url="https://docs.xfce.org/panel-plugins/xfce4-cpugraph-plugin"
groups=('xfce4-goodies')
depends=('xfce4-panel')
makedepends=('intltool')
source=(
	https://archive.xfce.org/src/panel-plugins/$_pkgname/${pkgver%.*}/$_pkgname-$pkgver.tar.bz2
	xfce4-memgraph-plugin-1.2.5.patch
)
sha256sums=(
	'c2f6dbd7f83c79b63b83c98232c79d050e18640e82464b9ec8d3643a92c3a1b0'
	'5b552b8382e89d70b53b513a8d81501ca9dfa38564ff5bcd3b4893949d16f195'
)

prepare() {
	mv "$srcdir/$_pkgname-$pkgver" "$srcdir/$pkgname-$pkgver"
	find "$srcdir/$pkgname-$pkgver" -type f -exec sed \
		's/cpu/mem/g;s/Cpu/Mem/g;s/CPU/MEM/g' -i {} +
	find "$srcdir/$pkgname-$pkgver" -type f -name '*cpu*' \
		| while read file; do
		rename cpu mem "$file"
	done
	patch -p2 < "$srcdir/xfce4-memgraph-plugin-1.2.5.patch"
}

build() {
  cd "$srcdir/$pkgname-$pkgver"

  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --libexecdir=/usr/lib \
    --localstatedir=/var \
    --disable-static \
    --disable-debug
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make DESTDIR="$pkgdir" install
  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

# vim:set ts=2 sw=2 et: