summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 913d6b31a8aa9c9ac623db07c683b763f5b7a7d4 (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
# Maintainer: Miguel Rodrigues <miguelangelorodrigues@enta.pt>
# Author: Amar Al-Zubaidi <https://amarakon.github.io>

_pkgbase="dfm"
pkgname="dmenu-$_pkgbase"
pkgver=r128.fba068e
pkgrel=1
pkgdesc="dmenu-dfm is a simple file manager that uses dmenu"
url="https://github.com/amarakon/dfm"
arch=(any)
license=('AGPL-3')
depends=('dmenu' 'perl' 'xdg-utils')
optdepends=('xclip' 'sesame')
provides=(dmenu-dfm)
source=(git+$url.git)
sha256sums=('SKIP')

prepare() {
	mv "$srcdir/$_pkgbase" "$srcdir/$pkgname"
	mv "$srcdir/$pkgname/$_pkgbase" "$srcdir/$pkgname/$pkgname"
	sed -i "s/\b$_pkgbase\b/$pkgname/g" "$srcdir/$pkgname/Makefile"
}

pkgver() {
	cd "$srcdir/$pkgname"
	printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

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