summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b401f1ac7ac49799e4ff2089680d3dee9d77061c (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
# Maintainer: Jingbei Li <i@jingbei.li>

pkgname=raspi-config-git
_gitname=raspi-config-alarm
pkgver=20200726.r329.b1ab50b
pkgrel=1
pkgdesc="A simple configuration tool for common Raspberry Pi administrative tasks (ArchlinuxARM fork)"
arch=('any')
url="https://github.com/petronny/raspi-config-alarm"
license=('MIT')
depends=(
	alsa-utils
	libnewt # Debian: whiptail
	lua51
	#systemd # Debian: initramfs-tools
	parted
	psmisc
)
makedepends=('git')
optdepends=(
	iw
	triggerhappy

	raspi-firmware
	xorg-xrandr
)
provides=('raspi-config')
conflicts=('raspi-config')
source=("git+${url}")
md5sums=('SKIP')

pkgver() {
	cd "${srcdir}/${_gitname}"
	(
		set -o pipefail
		git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
		printf "%s.r%s.%s" \
		"$(git log -1 --date=format:%Y%m%d --format=%ad)" \
		"$(git rev-list --count HEAD)" \
		"$(git log | head -n 1 | cut -d" " -f2 | awk '{print substr($0,0,7)}')"
	)
}

package() {
	cd "${srcdir}/${_gitname}"
	install -dm750 ${pkgdir}/etc/sudoers.d/
	cp -r usr etc ${pkgdir}
	install -Dm755 raspi-config ${pkgdir}/usr/bin/raspi-config
	#install -Dm644 autologin@.service ${pkgdir}/etc/systemd/system/autologin@.service
}