void-packages/srcpkgs/rpi-base/template

35 lines
1 KiB
Text

# Template file for 'rpi-base'
pkgname=rpi-base
version=1.3
revision=1
homepage="http://www.voidlinux.eu"
short_desc="Void Linux RaspberryPi base files"
maintainer="Juan RP <xtraeme@gmail.com>"
license="Public Domain"
only_for_archs="armv6l"
makedepends="ntp?ntp-daemon dhcpcd openssh-server rpi-firmware rpi-kernel"
depends="${makedepends}"
# Allow upgrades for compatibility.
provides="rpi-base-files-${version}_${revision}"
replaces="rpi-base-files>=0"
# enable ntpd, dhcpcd and sshd by default.
systemd_services="
ntpdate.service on
ntpd.service on
dhcpcd.service on
sshd.service on"
do_install() {
# Load the audio module by default.
vmkdir usr/lib/modules-load.d
echo snd-bcm2835 > ${DESTDIR}/usr/lib/modules-load.d/snd_bcm2835.conf
# Fix permissions for the vchiq device.
vmkdir usr/lib/udev/rules.d
echo 'SUBSYSTEM=="vchiq|input", GROUP="video", MODE="0660"' > \
${DESTDIR}/usr/lib/udev/rules.d/71-raspberrypi.rules
echo 'KERNEL=="mouse*|mice|event*", GROUP="video", MODE="0770"' >> \
${DESTDIR}/usr/lib/udev/rules.d/71-raspberrypi.rules
}