2012-10-14 21:09:21 +00:00
|
|
|
# Created by: Aldis Berjoza <aldis@bsdroot.lv>
|
2010-08-03 17:39:21 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= zfsnap
|
2012-12-30 04:28:48 +00:00
|
|
|
PORTVERSION= 1.11.0
|
2010-08-03 17:39:21 +00:00
|
|
|
CATEGORIES= sysutils
|
|
|
|
|
2011-09-17 08:42:12 +00:00
|
|
|
MAINTAINER= graudeejs@gmail.com
|
2010-08-03 17:39:21 +00:00
|
|
|
COMMENT= Simple sh script to make zfs rolling snaphosts with cron
|
|
|
|
|
|
|
|
NO_BUILD= yes
|
2012-12-30 04:28:48 +00:00
|
|
|
USE_GITHUB= yes
|
|
|
|
GH_PROJECT= zfSnap
|
|
|
|
GH_ACCOUNT= graudeejs
|
|
|
|
GH_TAGNAME= v${PORTVERSION}
|
|
|
|
GH_COMMIT= 2228749
|
2011-01-13 11:53:18 +00:00
|
|
|
|
|
|
|
PERIODICDIR?= ${PREFIX}/etc/periodic
|
|
|
|
PLIST_SUB+= PERIODICDIR="${PERIODICDIR:S,^${PREFIX}/,,}"
|
|
|
|
|
|
|
|
do-patch:
|
|
|
|
.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
|
2012-10-14 21:09:21 +00:00
|
|
|
.for period in hourly daily weekly monthly
|
2011-01-13 11:53:18 +00:00
|
|
|
@${SED} -e "s/xPERIODICx/${period}/g" -e "s#xPREFIXx#${PREFIX}/sbin#g" ${WRKSRC}/xPERIODICx_zfSnap_delete.sh > ${WRKSRC}/${period}_zfSnap_delete.sh
|
|
|
|
.endfor
|
2010-08-03 17:39:21 +00:00
|
|
|
|
|
|
|
do-install:
|
2013-12-27 18:32:09 +00:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/zfSnap.sh ${STAGEDIR}${PREFIX}/sbin/zfSnap
|
2012-12-30 04:28:48 +00:00
|
|
|
.for period in hourly daily weekly monthly
|
2013-12-27 18:32:09 +00:00
|
|
|
@${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
|
2011-01-13 11:53:18 +00:00
|
|
|
.endfor
|
2013-12-27 18:32:09 +00:00
|
|
|
@${MKDIR} ${STAGEDIR}${PERIODICDIR}/reboot
|
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/reboot_zfSnap.sh ${STAGEDIR}${PERIODICDIR}/reboot/402.zfSnap
|
2010-08-03 17:39:21 +00:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|