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