# $Id: Portfile 85823 2011-10-16 16:02:11Z kimuraw@macports.org $
PortSystem		1.0
PortGroup		ruby 1.0

ruby.setup		pdumpfs 1.3 gnu {README doc}
maintainers		nomaintainer
description		simply daily backup system similar to Plan9's dumpfs
long_description	pdumpfs is a simple daily backup system similar to \
					Plan9's dumpfs which preserves every daily snapshot. \
					pdumpfs is written in Ruby. You can access the past \
					snapshots at any time for retrieving a certain day's \
					file. Let's backup your home directory with pdumpfs!
categories-append	sysutils
homepage		http://0xcc.net/pdumpfs/
license			GPL-2
master_sites	${homepage}
checksums		md5 c1bb6514b3136854ca265913fd3765c9 \
				rmd160 a9730349347d50d06dd101b0c1d9a7b3e25777c1 \
				sha1 1ce91f0429d730fbc6e6f253d04e80226c145cdf
platforms		darwin
supported_archs	noarch

patchfiles		patch-pdumpfs-test

use_configure	no

build.target	${ruby.module}
post-build {
	reinplace "s|^#!.*ruby|#!${ruby.bin}|" ${worksrcpath}/pdumpfs
}

test.run		yes
test.target		check

destroot {
	xinstall -d -m 0755 ${destroot}${prefix}/bin
	xinstall -m 0755 ${worksrcpath}/pdumpfs ${destroot}${prefix}/bin
	xinstall -d -m 0755 ${destroot}${prefix}/share/man/man8
	xinstall -m 0644 ${worksrcpath}/man/man8/pdumpfs.8 \
					 ${destroot}${prefix}/share/man/man8
	xinstall -d -m 0755 ${destroot}${prefix}/share/man/ja/man8
	xinstall -m 0644 ${worksrcpath}/man/ja/man8/pdumpfs.8 \
					 ${destroot}${prefix}/share/man/ja/man8
}

