1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-13 03:03:15 +00:00
freebsd-ports/sysutils/zfsnap/Makefile
Eugene Grosbein f3f34c580c sysutils/zfsnap: fix -s/-S mode.
Move creation of files from "do-patch" to "post-extract" target,
so that patches from files/ directory get applied.

While here, add LICENSE.

PR:		223951
Submitted by:	Anton Sayetsky <vsasjason@gmail.com> (based on)
Approved by:	yamagi@yamagi.org (maintainer timeout, 7 weeks)
2018-01-22 17:05:49 +00:00

40 lines
1.3 KiB
Makefile

# Created by: Aldis Berjoza <aldis@bsdroot.lv>
# $FreeBSD$
PORTNAME= zfsnap
PORTVERSION= 1.11.1
DISTVERSIONPREFIX= v
PORTREVISION= 1
CATEGORIES= sysutils
MAINTAINER= yamagi@yamagi.org
COMMENT= Simple sh script to make zfs rolling snaphosts with cron
LICENSE= BSD3CLAUSE
NO_BUILD= yes
USE_GITHUB= yes
PERIODICDIR?= ${PREFIX}/etc/periodic
PLIST_SUB+= PERIODICDIR="${PERIODICDIR:S,^${PREFIX}/,,}"
post-extract:
.for period in hourly daily weekly monthly reboot
@${SED} -e "s/xPERIODICx/${period}/g" -e "s#xPREFIXx#${PREFIX}/sbin#g" ${WRKSRC}/xPERIODICx_zfSnap.sh > ${WRKSRC}/${period}_zfSnap.sh
.endfor
.for period in hourly daily weekly monthly
@${SED} -e "s/xPERIODICx/${period}/g" -e "s#xPREFIXx#${PREFIX}/sbin#g" ${WRKSRC}/xPERIODICx_zfSnap_delete.sh > ${WRKSRC}/${period}_zfSnap_delete.sh
.endfor
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/zfSnap.sh ${STAGEDIR}${PREFIX}/sbin/zfSnap
.for period in hourly daily weekly monthly
@${MKDIR} ${STAGEDIR}${PERIODICDIR}/${period}
${INSTALL_SCRIPT} ${WRKSRC}/${period}_zfSnap.sh ${STAGEDIR}${PERIODICDIR}/${period}/402.zfSnap
${INSTALL_SCRIPT} ${WRKSRC}/${period}_zfSnap_delete.sh ${STAGEDIR}${PERIODICDIR}/${period}/403.zfSnap_delete
.endfor
@${MKDIR} ${STAGEDIR}${PERIODICDIR}/reboot
${INSTALL_SCRIPT} ${WRKSRC}/reboot_zfSnap.sh ${STAGEDIR}${PERIODICDIR}/reboot/402.zfSnap
.include <bsd.port.mk>