--- Makefile (revision 446535) +++ Makefile (working copy) @@ -3,7 +3,7 @@ PORTNAME= dcc-dccd PORTVERSION= 1.3.159 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= mail MASTER_SITES= http://www.dcc-servers.net/dcc/source/old/ \ ftp://ftp.dcc-servers.net/src/dcc/old/ \ @@ -45,15 +45,17 @@ GROUPS= ${DCCGROUP} DCCHOME= ${PREFIX}/dcc +DCCDATA= /var/dcc -PLIST_SUB+= DCCUSER="${DCCUSER}" DCCGROUP="${DCCGROUP}" -SUB_FILES= pkg-install pkg-message -SUB_LIST+= WRKSRC=${WRKSRC} DCCHOME=${DCCHOME} DCCUSER="${DCCUSER}" +PLIST_SUB+= DCCUSER="${DCCUSER}" DCCGROUP="${DCCGROUP}" DCCDATA="${DCCDATA}" +SUB_FILES= pkg-install pkg-message +SUB_LIST+= ${PLIST_SUB} WRKSRC=${WRKSRC} DCCHOME=${DCCHOME} ## Use the configure script to explicitly set the locations of all files, ## in case the standard locations have been locally overridden ## Also, use a similar hack to USES=desthack. CONFIGURE_ARGS= -q \ + --without-DCC-MD5 \ --with-uid=${DCCUSER} \ --bindir=${PREFIX}/bin \ --mandir=${MANPREFIX}/man \ @@ -62,8 +64,8 @@ --with-make-cmd=${MAKE_CMD} \ --with-install-cmd=${BSD_INSTALL_PROGRAM} \ --enable-pkg-make \ - --homedir=${DCCHOME} \ - --libexecdir=${DCCHOME}/libexec \ + --homedir=${DCCDATA} \ + --libexecdir=${PREFIX}/libexec \ --with-cgibin=${DCCHOME}/cgi-bin CONFIGURE_ENV= ac_cv_header_histedit_h=no # disable libedit detection @@ -81,6 +83,8 @@ .include +EXTRACT_AFTER_ARGS+= --no-same-owner --no-same-permissions --exclude 'md5.?' + ## dccm milter support # .if ${PORT_OPTIONS:MPORTS_MILTER} @@ -100,31 +104,17 @@ PLIST_SUB+= IFD_MILT="@comment " .endif +post-patch: + ${REINPLACE_CMD} -e 's,md5.c ,,' ${WRKSRC}/clntlib/Makefile.in + ${REINPLACE_CMD} -e 's,^\(BININSTALL.*\),\1 -s,p' \ + -e 's,^BIN\(INSTALL\s*=\s*.*\) -s$$,SCRIPT\1,' ${WRKSRC}/Makefile.inc.in + ${REINPLACE_CMD} -e 's,BININSTALL,SCRIPTINSTALL,g' \ + ${WRKSRC}/homedir/Makefile.in ${WRKSRC}/misc/Makefile.in + post-install: @${MV} ${STAGEDIR}${PREFIX}/dcc/cgi-bin/footer-dist \ ${STAGEDIR}${PREFIX}/dcc/cgi-bin/footer.sample @${MV} ${STAGEDIR}${PREFIX}/dcc/cgi-bin/header-dist \ ${STAGEDIR}${PREFIX}/dcc/cgi-bin/header.sample -.for sf in bin/dccproc bin/cdcc dcc/libexec/dccsight dcc/libexec/check_ip_range \ - dcc/libexec/wlist dcc/libexec/ck2ip - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${sf} -.endfor -.if ${PORT_OPTIONS:MDCCIFD} || ${PORT_OPTIONS:MDCCM} - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/dcc/libexec/dns-helper -.endif -post-install-DCCIFD-on: -.for sf in bin/dccif-test dcc/libexec/dccifd - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${sf} -.endfor - -post-install-DCCD-on: -.for sf in dcc/libexec/dump-clients dcc/libexec/dbclean \ - dcc/libexec/dblist dcc/libexec/dccd - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${sf} -.endfor - -post-install-DCCM-on: - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/dcc/libexec/dccm - .include --- files/dccd.in (revision 446535) +++ files/dccd.in (working copy) @@ -31,8 +31,8 @@ # Set defaults : ${dccd_enable:="NO"} -: ${dccd_home="%%DCCHOME%%"} -: ${dccd_libexec="%%PREFIX%%/dcc/libexec"} +: ${dccd_home="%%DCCDATA%%"} +: ${dccd_libexec="%%PREFIX%%/libexec"} : ${dccd_conf="$dccd_home/dcc_conf"} --- files/dccgrey.in (revision 446535) +++ files/dccgrey.in (working copy) @@ -32,8 +32,8 @@ # Set defaults : ${dccgrey_enable:="NO"} -: ${dccgrey_home="%%DCCHOME%%"} -: ${dccgrey_libexec="%%PREFIX%%/dcc/libexec"} +: ${dccgrey_home="%%DCCDATA%%"} +: ${dccgrey_libexec="%%PREFIX%%/libexec"} : ${dccgrey_conf="$dccgrey_home/dcc_conf"} --- files/dccifd.in (revision 446535) +++ files/dccifd.in (working copy) @@ -32,8 +32,8 @@ # Set defaults : ${dccifd_enable:="NO"} -: ${dccifd_home="%%DCCHOME%%"} -: ${dccifd_libexec="%%PREFIX%%/dcc/libexec"} +: ${dccifd_home="%%DCCDATA%%"} +: ${dccifd_libexec="%%PREFIX%%/libexec"} : ${dccifd_conf="$dccifd_home/dcc_conf"} pidfile=${dccifd_pidfile:-"/var/run/dcc/dccifd.pid"} --- files/dccm.in (revision 446535) +++ files/dccm.in (working copy) @@ -32,8 +32,8 @@ # Set defaults : ${dccm_enable:="NO"} -: ${dccm_home="%%DCCHOME%%"} -: ${dccm_libexec="%%PREFIX%%/dcc/libexec"} +: ${dccm_home="%%DCCDATA%%"} +: ${dccm_libexec="%%PREFIX%%/libexec"} : ${dccm_conf="$dccm_home/dcc_conf"} pidfile=${dccm_pidfile:-"/var/run/dcc/dccm.pid"} --- files/pkg-install.in (revision 446535) +++ files/pkg-install.in (working copy) @@ -2,21 +2,19 @@ # $FreeBSD: /tmp/pcvs/ports/mail/dcc-dccd/files/pkg-install.in,v 1.2 2011-07-04 19:39:45 crees Exp $ PREFIX=${PKG_PREFIX:-%%PREFIX%%} -DCCHOME=%%DCCHOME%% +DCCDATA=%%DCCDATA%% DCCUSER=%%DCCUSER%% if [ "$2" = "POST-INSTALL" ]; then - /bin/sh $PREFIX/dcc/libexec/fix-map \ + /bin/sh $PREFIX/libexec/fix-map \ -n .nopasswd \ - -I $DCCHOME/ids.nopasswd -i $DCCHOME/ids \ - -T $DCCHOME/map.txt.nopasswd -t $DCCHOME/map.txt \ - -m $DCCHOME/map + -I $DCCDATA/ids.nopasswd -i $DCCDATA/ids \ + -T $DCCDATA/map.txt.nopasswd -t $DCCDATA/map.txt \ + -m $DCCDATA/map for file in ids map map.txt ; do - /bin/cp -p $DCCHOME/$file $DCCHOME/${file}.nopasswd - /usr/sbin/chown $DCCUSER $DCCHOME/${file} $DCCHOME/${file}.nopasswd + /bin/cp -p $DCCDATA/$file $DCCDATA/$file.nopasswd + /usr/sbin/chown $DCCUSER $DCCDATA/${file} $DCCDATA/$file.nopasswd done fi - -exit 0 --- files/pkg-message.in (revision 446535) +++ files/pkg-message.in (working copy) @@ -11,12 +11,12 @@ Daemon startup flags are also specified in %%DCCHOME%%/dcc_conf. -If you run the DCC server, %%LOCALBASE%%/dcc/libexec/cron-dccd should be +If you run the DCC server, %%PREFIX%%/libexec/cron-dccd should be run at least daily from the crontab to clean old checksums from the DB. If you just run the client, you may still wish to add -%%LOCALBASE%%/dcc/libexec/cron-dccd to your crontab to clean up the +%%PREFIX%%/libexec/cron-dccd to your crontab to clean up the client's log files on a regular basis. dcc_conf's DBCLEAN_LOGDAYS variable controls the number of days to keep logs. --- pkg-plist (revision 446535) +++ pkg-plist (working copy) @@ -12,39 +12,39 @@ dcc/cgi-bin/webuser-notify @sample dcc/cgi-bin/footer.sample @sample dcc/cgi-bin/header.sample -dcc/libexec/check_ip_range -dcc/libexec/ck2ip -dcc/libexec/cron-dccd -%%DCCIFD%%dcc/libexec/dccifd -%%DCCM%%dcc/libexec/dccm -%%DCCD%%dcc/libexec/dbclean -%%DCCD%%dcc/libexec/dblist -%%DCCD%%dcc/libexec/dump-clients -dcc/libexec/dcc-nagios -dcc/libexec/dcc-stats-collect -dcc/libexec/dcc-stats-graph -dcc/libexec/dcc-stats-init -dcc/libexec/dcc-stats-update -%%DCCD%%dcc/libexec/dccd -@(%%DCCUSER%%,%%DCCGROUP%%,4555) dcc/libexec/dccsight -%%IFD_MILT%%dcc/libexec/dns-helper -dcc/libexec/fetchblack -dcc/libexec/fetch-testmsg-whitelist -dcc/libexec/fix-map -dcc/libexec/hackmc -dcc/libexec/list-clients -dcc/libexec/logger -dcc/libexec/newwebuser -dcc/libexec/rcDCC -dcc/libexec/start-dccd -dcc/libexec/start-dccifd -dcc/libexec/start-dccm -dcc/libexec/start-grey -dcc/libexec/stats-get -dcc/libexec/stop-dccd -dcc/libexec/updatedcc -dcc/libexec/uninstalldcc -dcc/libexec/wlist +libexec/check_ip_range +libexec/ck2ip +libexec/cron-dccd +%%DCCIFD%%libexec/dccifd +%%DCCM%%libexec/dccm +%%DCCD%%libexec/dbclean +%%DCCD%%libexec/dblist +%%DCCD%%libexec/dump-clients +libexec/dcc-nagios +libexec/dcc-stats-collect +libexec/dcc-stats-graph +libexec/dcc-stats-init +libexec/dcc-stats-update +%%DCCD%%libexec/dccd +@(%%DCCUSER%%,%%DCCGROUP%%,4555) libexec/dccsight +%%IFD_MILT%%libexec/dns-helper +libexec/fetchblack +libexec/fetch-testmsg-whitelist +libexec/fix-map +libexec/hackmc +libexec/list-clients +libexec/logger +libexec/newwebuser +libexec/rcDCC +libexec/start-dccd +libexec/start-dccifd +libexec/start-dccm +libexec/start-grey +libexec/stats-get +libexec/stop-dccd +libexec/updatedcc +libexec/uninstalldcc +libexec/wlist man/man8/cdcc.8.gz man/man8/dbclean.8.gz man/man8/dblist.8.gz @@ -56,24 +56,24 @@ man/man8/dccsight.8.gz @owner %%DCCUSER%% @group %%DCCGROUP%% -@sample dcc/dcc_conf.sample -@sample dcc/flod.sample -@sample dcc/grey_flod.sample -@sample dcc/grey_whitelist.sample -@sample dcc/ids.sample -@sample dcc/map.txt.sample -@sample dcc/map.sample -@sample dcc/whiteclnt.sample -@sample dcc/whitecommon.sample -@sample dcc/whitelist.sample -%%IFD_MILT%%@unexec [ -e %D/dcc/whiteclnt.dccw ] && rm -f %D/dcc/whiteclnt.dccw || true -%%IFD_MILT%%@unexec [ -e %D/dcc/whiteclnt.dccx ] && rm -f %D/dcc/whiteclnt.dccx || true -%%DCCD%%@unexec [ -e %D/dcc/dcc_db ] && rm -f %D/dcc/dcc_db || true -%%DCCD%%@unexec [ -e %D/dcc/dcc_db.hash ] && rm -f %D/dcc/dcc_db.hash || true -%%DCCD%%@unexec [ -e %D/dcc/flod.map ] && rm -f %D/dcc/flod.map || true -%%DCCD%%@unexec [ -e %D/dcc/dccd_clients ] && rm -f %D/dcc/dccd_clients || true -%%DCCGREY%%@unexec [ -e %D/dcc/grey_db.hash ] && rm -f %D/dcc/grey_db.hash || true -%%DCCGREY%%@unexec [ -e %D/dcc/grey_flod.map ] && rm -f %D/dcc/grey_flod.map || true -%%DCCGREY%%@unexec [ -e %D/dcc/grey_clients ] && rm -f %D/dcc/grey_clients || true -@dir dcc/log -@dir dcc +@sample %%DCCDATA%%/dcc_conf.sample +@sample %%DCCDATA%%/flod.sample +@sample %%DCCDATA%%/grey_flod.sample +@sample %%DCCDATA%%/grey_whitelist.sample +@sample %%DCCDATA%%/ids.sample +@sample %%DCCDATA%%/map.txt.sample +@sample %%DCCDATA%%/map.sample +@sample %%DCCDATA%%/whiteclnt.sample +@sample %%DCCDATA%%/whitecommon.sample +@sample %%DCCDATA%%/whitelist.sample +%%IFD_MILT%%@unexec [ -e %%DCCDATA%%/whiteclnt.dccw ] && rm -f %%DCCDATA%%/whiteclnt.dccw || true +%%IFD_MILT%%@unexec [ -e %%DCCDATA%%/whiteclnt.dccx ] && rm -f %%DCCDATA%%/whiteclnt.dccx || true +%%DCCD%%@unexec [ -e %%DCCDATA%%/dcc_db ] && rm -f %%DCCDATA%%/dcc_db || true +%%DCCD%%@unexec [ -e %%DCCDATA%%/dcc_db.hash ] && rm -f %%DCCDATA%%/dcc_db.hash || true +%%DCCD%%@unexec [ -e %%DCCDATA%%/flod.map ] && rm -f %%DCCDATA%%/flod.map || true +%%DCCD%%@unexec [ -e %%DCCDATA%%/dccd_clients ] && rm -f %%DCCDATA%%/dccd_clients || true +%%DCCGREY%%@unexec [ -e %%DCCDATA%%/grey_db.hash ] && rm -f %%DCCDATA%%/grey_db.hash || true +%%DCCGREY%%@unexec [ -e %%DCCDATA%%/grey_flod.map ] && rm -f %%DCCDATA%%/grey_flod.map || true +%%DCCGREY%%@unexec [ -e %%DCCDATA%%/grey_clients ] && rm -f %%DCCDATA%%/grey_clients || true +@dir %%DCCDATA%%/log +@dir %%DCCDATA%%