summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7fa8df25059858c4e27b6640fc524c895f8332dc (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
# Maintainer: Adrián Pérez de Castro
pkgdesc='Flexible terminal-based text editor'
pkgname=mle-git
pkgver=r379.af76670
pkgrel=2
arch=(x86_64)
url='https://github.com/adsr/mle'
license=(Apache)
depends=(pcre termbox lua)
makedepends=(git uthash)
source=("${pkgname}::git+${url}")
sha512sums=(SKIP)

pkgver () {
	cd "${pkgname}"
	(
		set -o pipefail
		git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
		printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
	)
}

prepare () {
	cd "${pkgname}"

	# The source code uses <lua5.3/lua.h>; and the Arch Linux "lua" package
	# places the headers directly under /usr/include, so let's just use a
	# symlink to provide the headers at the expected include location.
	ln -snf /usr/include lua5.3
}

build () {
	cd "${pkgname}"
	make prefix=/usr
}

package () {
	cd "${pkgname}"
	make prefix=/usr DESTDIR="${pkgdir}" install
}