summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b436e9a1c51dbfc7f7c9ba361c79c5c7d2d060e3 (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
# Maintainer: Norbert Preining <norbert@preining.info>
# Contributor: Magnus Anderson <magnus@iastate.edu>
pkgname=px_ptop
pkgver=3.6.5
pkgrel=1
pkgdesc="ps and top for Human Beings"
arch=('any')
url="https://github.com/walles/px"
license=('MIT')
depends=('python')

package() {
	mkdir -p "${pkgdir}/usr/bin"
	curl -Ls https://github.com/walles/px/raw/python/install.sh > install.sh
	sed -i 's/sudo//' install.sh
	sed -i "s|/usr/local/bin|$pkgdir/usr/bin|" install.sh
	bash install.sh

	# The script installs two identical binaries. Fix this
	rm "$pkgdir/usr/bin/ptop"
	ln -s px "$pkgdir/usr/bin/ptop"

	# Install license from latest github LICENSE
	curl -Ls https://raw.githubusercontent.com/walles/px/python/LICENSE > LICENSE
	install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}