# Template file for 'scron'
pkgname=scron
version=0.4
revision=3
wrksrc=${pkgname}
build_style=gnu-makefile
short_desc="Simple cron daemon"
maintainer="Tuxliban Torvalds <tenshalito@gmail.com>"
license="MIT"
homepage="https://git.disroot.org/tuxliban/scron"
distfiles="${homepage}/archive/${version}.tar.gz"
checksum=eec79d97efbc5237f171fd43610b4aca20833c687721e795bfa9600d7845f3b6
provides="cron-daemon-0_1"

alternatives="
 crond:crond:/etc/sv/scron
 crond:crond:/usr/bin/scrond
 "

pre_build() {
	# STFU gcc
	sed -i 's|BSD_SOURCE|DEFAULT_SOURCE|g' Makefile
	sed -i 's|^CC|#CC|g' Makefile
	sed -i 's|^CFLAGS|#CFLAGS|g' Makefile
	sed -i 's|^LDFLAGS|#LDFLAGS|g' Makefile
}

do_install() {
	vbin crond scrond
	vsv scron
	vlicense LICENSE
	vdoc README
	vman scron.1
}
