mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-25 00:51:21 +00:00
- add rc.subr(8) start/stop script
- assume maintainership, I don't speak Haskell .-P - install some additional documentation - USE_SSH => !WITHOUT_SSH, no extra warning since this is default for OSVERSION >= 400016 - added a test target - bumped PORTREVISION Approved by: marcus (mentor)
This commit is contained in:
parent
4e4382de6f
commit
95dd23c598
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=94131
@ -8,14 +8,14 @@
|
||||
|
||||
PORTNAME= rsync
|
||||
PORTVERSION= 2.5.6
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= net ipv6
|
||||
MASTER_SITES= ftp://samba.anu.edu.au/pub/rsync/ \
|
||||
ftp://sunsite.auc.dk/pub/unix/rsync/ \
|
||||
ftp://ftp.sunet.se/pub/unix/admin/rsync/ \
|
||||
ftp://ftp.fu-berlin.de/pub/unix/network/rsync/
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
MAINTAINER= eik@FreeBSD.org
|
||||
COMMENT= A network file distribution/synchronization utility
|
||||
|
||||
.if defined(WITH_POPT_PORT)
|
||||
@ -25,6 +25,7 @@ LIB_DEPENDS= popt.0:${PORTSDIR}/devel/popt
|
||||
USE_REINPLACE= yes
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ARGS= --disable-debug
|
||||
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
|
||||
|
||||
.if defined(WITH_POPT_PORT)
|
||||
CONFIGURE_ENV= CFLAGS="-I${LOCALBASE}/include" \
|
||||
@ -33,15 +34,26 @@ CONFIGURE_ENV= CFLAGS="-I${LOCALBASE}/include" \
|
||||
CONFIGURE_ARGS+= --with-included-popt
|
||||
.endif
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OSVERSION} >= 400016
|
||||
USE_SSH?= yes
|
||||
.else
|
||||
USE_SSH?= no
|
||||
.if !defined(NOPORTDOCS)
|
||||
PORTDOCS= NEWS README csprotocol.txt tech_report.tex
|
||||
.endif
|
||||
|
||||
.if ${USE_SSH:U} == YES
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OSVERSION} >= 500038
|
||||
RC_SUBR?= /etc/rc.subr
|
||||
.else
|
||||
USE_RC_SUBR= yes
|
||||
.endif
|
||||
|
||||
SED_SCRIPT+= -e 's,%%PREFIX%%,${PREFIX},g' \
|
||||
-e 's,%%RC_SUBR%%,${RC_SUBR},g'
|
||||
|
||||
.if ${OSVERSION} < 400016
|
||||
WITHOUT_SSH?= yes
|
||||
.endif
|
||||
|
||||
.if !defined(WITHOUT_SSH)
|
||||
CONFIGURE_ARGS+= --with-rsh=ssh
|
||||
.endif
|
||||
|
||||
@ -71,18 +83,23 @@ pre-configure:
|
||||
@${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|g' \
|
||||
${WRKSRC}/rsync.h ${WRKSRC}/zlib/zutil.h
|
||||
|
||||
post-build:
|
||||
@${SED} ${SED_SCRIPT} <${FILESDIR}/rsyncd.sh >${WRKDIR}/rsyncd.sh
|
||||
|
||||
post-install:
|
||||
@${STRIP_CMD} ${PREFIX}/bin/rsync
|
||||
${INSTALL_DATA} ${FILESDIR}/rsyncd.conf.sample ${PREFIX}/etc/
|
||||
${INSTALL_SCRIPT} ${FILESDIR}/rsyncd.sh.sample ${PREFIX}/etc/rc.d/
|
||||
@${INSTALL_DATA} ${FILESDIR}/rsyncd.conf.sample ${PREFIX}/etc/
|
||||
@[ -f ${PREFIX}/etc/rsyncd.conf ] || cp ${PREFIX}/etc/rsyncd.conf.sample ${PREFIX}/etc/rsyncd.conf
|
||||
@${INSTALL_SCRIPT} ${WRKDIR}/rsyncd.sh ${PREFIX}/etc/rc.d/
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/COPYING ${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/tech_report.tex ${DOCSDIR}
|
||||
@${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}
|
||||
.endif
|
||||
.if ${USE_SSH:U} == YES
|
||||
.if !defined(WITHOUT_SSH)
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
.endif
|
||||
|
||||
test: build
|
||||
@cd ${WRKSRC}; ${SH} -c 'umask 0; ./test.sh'
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
11
net/rsync/files/patch-test.sh
Normal file
11
net/rsync/files/patch-test.sh
Normal file
@ -0,0 +1,11 @@
|
||||
--- test.sh.orig Sun Nov 16 20:30:24 2003
|
||||
+++ test.sh Sun Nov 16 20:30:40 2003
|
||||
@@ -165,7 +165,7 @@
|
||||
|
||||
rm -rf ${TO}
|
||||
mkdir -p ${FROM}2/dir/subdir
|
||||
-cp -a ${FROM}/dir/subdir/subsubdir ${FROM}2/dir/subdir
|
||||
+cp -pR ${FROM}/dir/subdir/subsubdir ${FROM}2/dir/subdir
|
||||
cp ${FROM}/dir/* ${FROM}2/dir 2>/dev/null
|
||||
runtest "excludes" 'checkit "$RSYNC -vv -Hlrt --delete --include /dir/ --include /dir/\* --include /dir/\*/subsubdir --include /dir/\*/subsubdir/\*\* --exclude \*\* ${FROM}/dir ${TO}" ${FROM}2/ ${TO}'
|
||||
rm -r ${FROM}2
|
34
net/rsync/files/rsyncd.sh
Normal file
34
net/rsync/files/rsyncd.sh
Normal file
@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: rsyncd
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: FreeBSD shutdown
|
||||
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf to enable rsyncd:
|
||||
#
|
||||
#rsyncd_enable="YES"
|
||||
#
|
||||
# See rsync(1) for flags
|
||||
#
|
||||
|
||||
. %%RC_SUBR%%
|
||||
|
||||
name=rsyncd
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
command=%%PREFIX%%/bin/rsync
|
||||
command_args="--daemon"
|
||||
pidfile=/var/run/${name}.pid
|
||||
required_files=%%PREFIX%%/etc/${name}.conf
|
||||
|
||||
# set defaults
|
||||
|
||||
rsyncd_enable=${rsyncd_enable:-"NO"}
|
||||
rsyncd_flags=${rsyncd_flags:-""}
|
||||
|
||||
load_rc_config ${name}
|
||||
run_rc_command "$1"
|
@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ -x /usr/local/bin/rsync ] && [ -f /usr/local/etc/rsyncd.conf ] && \
|
||||
/usr/local/bin/rsync --daemon > /dev/null && echo -n ' rsyncd'
|
||||
;;
|
||||
stop)
|
||||
[ -r /var/run/rsyncd.pid ] && /bin/kill -9 `cat /var/run/rsyncd.pid` > /dev/null && echo -n ' rsyncd'
|
||||
;;
|
||||
*)
|
||||
echo "Usage: `basename $0` {start|stop}" >&2
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
@ -1,8 +1,6 @@
|
||||
@comment $FreeBSD$
|
||||
bin/rsync
|
||||
@unexec if cmp -s %D/etc/rsyncd.conf.sample %D/etc/rsyncd.conf; then rm -f %D/etc/rsyncd.conf; fi
|
||||
etc/rsyncd.conf.sample
|
||||
etc/rc.d/rsyncd.sh.sample
|
||||
%%PORTDOCS%%share/doc/rsync/README
|
||||
%%PORTDOCS%%share/doc/rsync/COPYING
|
||||
%%PORTDOCS%%share/doc/rsync/tech_report.tex
|
||||
%%PORTDOCS%%@dirrm share/doc/rsync
|
||||
@exec [ -f %B/rsyncd.conf ] || cp %B/%f %B/rsyncd.conf
|
||||
etc/rc.d/rsyncd.sh
|
||||
|
Loading…
Reference in New Issue
Block a user