### this file is sourced not run
# source: james

repo=dcron
pkgname=${repo} # for SLACKDESC

# Uncomment either section [1] master commit or [2] official release below.

hash=1ba33c3325df48de46263276a43ed76cf9d81518
MD5SUM=8dd0bc8d24d4098e2884a93ab691eb60
hash7=${hash#???????}; hash7=${hash%$hash7}
fetch_date=2020.04
PKGVER=4.5.$fetch_date

TARBALL=$pkgname-$PKGVER.tar.gz
SRC_URL=https://github.com/dubiousjim/$repo/archive/$hash.tar.gz

PKGARCH=x86_64
PKGBUILD=1
BUNDLE=

SLACKREQ='' 
SLACKDESC="$pkgname: $pkgname $PKGVER (Lightweight cron daemon)
$pkgname: 
$pkgname: dcron is Matt Dillon (of DragonFlyBSD fame) version of cron. It aims 
$pkgname: to be simple, secure, lightweight but with enough features to be 
$pkgname: useful.
$pkgname: 
$pkgname: Conflicts with vixie-cron. Do not install both.
$pkgname: 
$pkgname: https://github.com/dubiousjim/dcron
$pkgname: http://www.jimpryor.net/linux/dcron.html
$pkgname: 
"
SLACKCON='vixie-cron'

### default pkg_download
### default pkg_prepare
### default pkg_package

### build
pkg_build() {
	echo "users:x:500:" >> /etc/group &&
	cd /tmp/dcron* &&
	
	MAKEFLAGS="$MAKEFLAGS PREFIX=/usr CRONTAB_GROUP=users"
	make $MAKEFLAGS && make $MAKEFLAGS install &&
	pkg_build_slackdesc &&

	# extras
	install -m755 extra/prune-cronstamps /etc/cron.d &&
	install -dm755 /etc/init.d &&
	install -m644 /tmp/pkg/82-dcron /etc/init.d &&

	rm -f /etc/group
}

# vim:ft=sh:

