diff options
author | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2004-07-20 22:08:44 +0000 |
---|---|---|
committer | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2004-07-20 22:08:44 +0000 |
commit | 10379bfe47e40791475f72651976cd3ac17ea2f5 (patch) | |
tree | 2ca0ec65e604b6bb3119a889541aea6b86bac898 /sysutils/dolly/Makefile | |
parent | 6deb688887132ab2378fa7cdc8bc55e6ae82fd1e (diff) |
Notes
Diffstat (limited to 'sysutils/dolly/Makefile')
-rw-r--r-- | sysutils/dolly/Makefile | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/sysutils/dolly/Makefile b/sysutils/dolly/Makefile new file mode 100644 index 000000000000..d3194ee6102f --- /dev/null +++ b/sysutils/dolly/Makefile @@ -0,0 +1,85 @@ +# New ports collection makefile for: dolly +# Date created: Thu Jul 15 10:01:46 UTC 2004 +# Whom: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= dolly +PORTVERSION= 0.57 +CATEGORIES= sysutils net +MASTER_SITES= http://www.cs.inf.ethz.ch/CoPs/patagonia/dolly/ +DISTNAME= ${PORTNAME}.${PORTVERSION} + +MAINTAINER= lioux@FreeBSD.org +COMMENT= A program to clone harddisks/partitions over a fast switched network + +USE_REINPLACE= yes + +OPTIONS= BZIP2 "bzip2 instead of gzip for compressing" on \ + HIGHEST_COMPRESSION "Highest rather than fastest compression" on + +PLIST_FILES= bin/${PORTNAME} +PORTDOCS= README + +do-configure: +# C{C,FLAGS} safeness + @${REINPLACE_CMD} -E \ + -e 's|^(CC[[:space:]]*=).*$$|\1${CC}|' \ + -e 's|^(CFLAGS[[:space:]]*=.*)$$|\1 ${CFLAGS}|' \ + ${BUILD_WRKSRC}/${MAKEFILE} + +do-install: +.ifndef(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} +. for file in ${PORTDOCS} + @${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}/ +. endfor +.endif + @${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/ + +.include <bsd.port.pre.mk> + +# Correctly depend upon bzip2 if necessary +.ifdef(WITH_BZIP2) +. if !exists(/usr/bin/bzip2) +RUN_DEPENDS+= bzip2:${PORTSDIR}/archivers/bzip2 +. endif + +EXTRA_PATCHES+= ${FILESDIR}/extra-bzip2-patch-dolly.c +.endif + +post-patch: +# fix comment error + @${REINPLACE_CMD} -E \ + -e 's|use gzip|use gunzip|' \ + ${WRKSRC}/dolly.c +# Properly reference bzip2 instead of gzip +.ifdef(WITH_BZIP2) + @${REINPLACE_CMD} -E \ + -e 's|/usr/bin/gzip|${BZIP2_CMD}|' \ + -e 's|gzip|bzip2|' \ + -e 's|/usr/bin/gunzip|${BZCAT}|' \ + ${WRKSRC}/dolly.c +# Use specific FreeBSD references +# Fix spelling + @${REINPLACE_CMD} -E \ + -e 's|gnu-zipped|bzipped|' \ + -e 's|sda([[:digit:]])|da\1|g' \ + -e 's|/sda|/da|g' \ + -e 's|sda_|da_|g' \ + -e 's|hypennormal|hyphennormal|' \ + ${WRKSRC}/README + @${REINPLACE_CMD} -E \ + -e 's|gunzip|bzcat|' \ + -e 's|\.gz|\.bz2|g' \ + ${WRKSRC}/* +.endif +# Highest compression possible +.ifdef(WITH_HIGHEST_COMPRESSION) + @${REINPLACE_CMD} -E \ + -e 's|-cf|-9cf|' \ + ${WRKSRC}/dolly.c +.endif + +.include <bsd.port.post.mk> |