diff options
author | Bryan Drewery <bdrewery@FreeBSD.org> | 2013-02-04 23:24:39 +0000 |
---|---|---|
committer | Bryan Drewery <bdrewery@FreeBSD.org> | 2013-02-04 23:24:39 +0000 |
commit | 62db6b5c766e6fa993affadaa8754c792ff48a13 (patch) | |
tree | dffec619af67201b42e4d1e8dd2826a3d32960d6 /sysutils/zfstools | |
parent | aba5395c819a160f3829140b4b64739882e4db16 (diff) | |
download | ports-62db6b5c766e6fa993affadaa8754c792ff48a13.tar.gz ports-62db6b5c766e6fa993affadaa8754c792ff48a13.zip |
Notes
Diffstat (limited to 'sysutils/zfstools')
-rw-r--r-- | sysutils/zfstools/Makefile | 38 | ||||
-rw-r--r-- | sysutils/zfstools/distinfo | 4 | ||||
-rw-r--r-- | sysutils/zfstools/files/pkg-message.in | 17 | ||||
-rw-r--r-- | sysutils/zfstools/pkg-plist | 13 |
4 files changed, 61 insertions, 11 deletions
diff --git a/sysutils/zfstools/Makefile b/sysutils/zfstools/Makefile index 8ea7a643fddd..253acf00c759 100644 --- a/sysutils/zfstools/Makefile +++ b/sysutils/zfstools/Makefile @@ -1,18 +1,38 @@ # $FreeBSD$ PORTNAME= zfstools -PORTVERSION= 0.2.1 -CATEGORIES= sysutils rubygems -MASTER_SITES= RG +PORTVERSION= 0.2.2 +CATEGORIES= sysutils ruby +MASTER_SITES= GH \ + http://mirror.shatow.net/freebsd/${PORTNAME}/ MAINTAINER= bdrewery@FreeBSD.org -COMMENT= OpenSolaris-compatible auto snapshotting +COMMENT= OpenSolaris-compatible auto snapshotting for ZFS + +LICENSE= BSD +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +USE_GITHUB= yes +GH_ACCOUNT= bdrewery +GH_COMMIT= 924b60c +GH_TAGNAME= v${DISTVERSION} USE_RUBY= yes -USE_RUBYGEMS= yes -RUBYGEM_AUTOPLIST= yes -PLIST_FILES= bin/zfs-auto-snapshot \ - bin/zfs-cleanup-snapshots \ - bin/zfs-snapshot-mysql +NO_BUILD= yes + +SUB_FILES= pkg-message + +.include <bsd.port.options.mk> + +do-install: + @cd ${WRKSRC}/bin && ${COPYTREE_BIN} . ${PREFIX}/sbin + @cd ${WRKSRC}/lib && ${COPYTREE_SHARE} . ${RUBY_SITELIBDIR} +.if ${PORT_OPTIONS:MDOCS} + @${MKDIR} ${DOCSDIR} + @${INSTALL_DATA} ${WRKSRC}/README.md ${DOCSDIR} +.endif + +post-install: + @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> diff --git a/sysutils/zfstools/distinfo b/sysutils/zfstools/distinfo index 31bda33a5013..1c80448e80b9 100644 --- a/sysutils/zfstools/distinfo +++ b/sysutils/zfstools/distinfo @@ -1,2 +1,2 @@ -SHA256 (rubygem/zfstools-0.2.1.gem) = dce9bdce62da661ff6bed42061b8263c909cc27294dc73e4b2a423d9ba5045ec -SIZE (rubygem/zfstools-0.2.1.gem) = 13312 +SHA256 (zfstools-0.2.2.tar.gz) = 64f6e0c39942b8300a91c82b2674172df437bf76e4b17fe8ab10b1d008e57a22 +SIZE (zfstools-0.2.2.tar.gz) = 10665 diff --git a/sysutils/zfstools/files/pkg-message.in b/sysutils/zfstools/files/pkg-message.in new file mode 100644 index 000000000000..5c7a71513443 --- /dev/null +++ b/sysutils/zfstools/files/pkg-message.in @@ -0,0 +1,17 @@ +To enable automatic snapshots, place lines such as these into /etc/crontab: + + 15,30,45 * * * * root %%PREFIX%%/sbin/zfs-auto-snapshot frequent 4 + 0 * * * * root %%PREFIX%%/sbin/zfs-auto-snapshot hourly 24 + 7 0 * * * root %%PREFIX%%/sbin/zfs-auto-snapshot daily 7 + 14 0 * * 7 root %%PREFIX%%/sbin/zfs-auto-snapshot weekly 4 + 28 0 1 * * root %%PREFIX%%/sbin/zfs-auto-snapshot monthly 12 + +This will keep 4 15-minutely snapshots, 24 hourly snapshots, 7 daily snapshots, +4 weekly snapshots and 12 monthly snapshots. Any resulting zero-sized snapshots +will be automatically cleaned up. + +Enable snapshotting on a dataset or top-level pool with: + + zfs set com.sun:auto-snapshot=true DATASET + +See website and command usage output for further details. diff --git a/sysutils/zfstools/pkg-plist b/sysutils/zfstools/pkg-plist new file mode 100644 index 000000000000..0a750165bd4c --- /dev/null +++ b/sysutils/zfstools/pkg-plist @@ -0,0 +1,13 @@ +%%PORTDOCS%%%%DOCSDIR%%/README.md +%%RUBY_SITELIBDIR%%/zfstools.rb +%%RUBY_SITELIBDIR%%/zfstools/dataset.rb +%%RUBY_SITELIBDIR%%/zfstools/snapshot.rb +@dirrm %%RUBY_SITELIBDIR%%/zfstools +@dirrmtry %%RUBY_SITELIBDIR%% +@dirrmtry lib/ruby/site_ruby +@dirrmtry lib/ruby +%%PORTDOCS%%@dirrm %%DOCSDIR%% +@exec /bin/mkdir -p %D/%%RUBY_SITELIBDIR%%/zfstools +sbin/zfs-auto-snapshot +sbin/zfs-cleanup-snapshots +sbin/zfs-snapshot-mysql |