PORTNAME=p5-Mail-SpamAssassin PORTDIR=/usr/ports/mail/${PORTNAME}/ CONFDIR=/usr/local/etc/mail/spamassassin STARTUP_SCRIPT=/usr/local/etc/rc.d/sa-spamd* include ../make.conf-default -include ../make.conf include Makefile.inc #_PORTUPGRADE_TOOL_=`/bin/sh -c 'if [ -z "${PORTUPGRADE_TOOL}" ] ; then if [ -f /usr/local/sbin/portupgrade ] ; then echo "portupgrade" ; elif [ -f /usr/local/sbin/portmaster ] ; then echo "portmaster" ; fi ; else echo ${PORTUPGRADE_TOOL} ; fi'` _PORTUPGRADE_TOOL_:=$(shell if [ -z "${PORTUPGRADE_TOOL}" ] ; then if [ -f /usr/local/sbin/portupgrade ] ; then echo "portupgrade" ; elif [ -f /usr/local/sbin/portmaster ] ; then echo "portmaster" ; fi ; else echo ${PORTUPGRADE_TOOL} ; fi) replace : replace_port replace_port : rsync -avz --delete core/ ${PORTDIR} patch_port : /bin/sh -c ' \ if [ -d ${CURDIR}/files ] ; then \ cp -p ${CURDIR}/files/* ${PORTDIR}/files/ ; \ fi ; \ if [ -d ${CURDIR}/files-port ] ; then \ cp -p ${CURDIR}/files-port/* ${PORTDIR}/ ; \ fi ; \ cd ${PORTDIR} ; \ if [ -d ${CURDIR}/patches-port ] ; then \ for patch in ${CURDIR}/patches-port/*.patch ; do \ echo "patch < $${patch}" ; \ patch < $${patch} ; \ done ; \ fi ; \ ' clean : /bin/sh -c 'cd ${PORTDIR} ; make clean' fetch : /bin/sh -c 'cd ${PORTDIR} ; make fetch' build : patch /bin/sh -c 'cd ${PORTDIR} ; make build' install : patch /bin/sh -c 'cd ${PORTDIR} ; make install' deinstall : patch /bin/sh -c 'cd ${PORTDIR} ; make deinstall' #portupgrade : patch # [ -d ${SPAMD_HOME} ] && /usr/local/bin/rsync -av --exclude ".spamassassin/sa-compile.cache/rules.body_0" ${SPAMD_HOME}/ ${SPAMD_HOME}.bak/ ; \ # if [ "${_PORTUPGRADE_TOOL_}" = "portupgrade" ] ; then \ # portupgrade ${PORTUPGRADE_OPTIONS} ${PORTNAME} ; \ # elif [ "${_PORTUPGRADE_TOOL_}" = "portmaster" ] ; then \ # PAGER=/bin/cat portmaster ${PORTMASTER_OPTIONS} ${PORTNAME} ; \ # fi # if [ -d ${SPAMD_HOME}.bak ] ; then \ # if [ -d ${SPAMD_HOME} ] && [ -z "`ls -1d ${SPAMD_HOME}/* 2>/dev/null`" ] ; then \ # /bin/rm -rf ${SPAMD_HOME} ; \ # fi ; \ # if [ -d ${SPAMD_HOME} ] ; then \ # /bin/rm -rf ${SPAMD_HOME}.bak ; \ # else \ # /bin/mv ${SPAMD_HOME}.bak ${SPAMD_HOME} ; \ # fi ; \ # fi portupgrade : patch if [ "${_PORTUPGRADE_TOOL_}" = "portupgrade" ] ; then \ portupgrade ${PORTUPGRADE_OPTIONS} ${PORTNAME} ; \ elif [ "${_PORTUPGRADE_TOOL_}" = "portmaster" ] ; then \ PAGER=/bin/cat portmaster ${PORTMASTER_OPTIONS} ${PORTNAME} ; \ fi force_portupgrade : portupgrade_force #portupgrade_force : patch # [ -d ${SPAMD_HOME} ] && /usr/local/bin/rsync -av --exclude ".spamassassin/sa-compile.cache/rules.body_0" ${SPAMD_HOME}/ ${SPAMD_HOME}.bak/ ; \ # if [ "${_PORTUPGRADE_TOOL_}" = "portupgrade" ] ; then \ # portupgrade -f ${PORTUPGRADE_OPTIONS} ${PORTNAME} ; \ # elif [ "${_PORTUPGRADE_TOOL_}" = "portmaster" ] ; then \ # PAGER=/bin/cat portmaster -f ${PORTMASTER_OPTIONS} ${PORTNAME} ; \ # fi # if [ -d ${SPAMD_HOME}.bak ] ; then \ # if [ -d ${SPAMD_HOME} ] && [ -z "`ls -1d ${SPAMD_HOME}/* 2>/dev/null`" ] ; then \ # /bin/rm -rf ${SPAMD_HOME} ; \ # fi ; \ # if [ -d ${SPAMD_HOME} ] ; then \ # /bin/rm -rf ${SPAMD_HOME}.bak ; \ # else \ # /bin/mv ${SPAMD_HOME}.bak ${SPAMD_HOME} ; \ # fi ; \ # fi portupgrade_force : patch if [ "${_PORTUPGRADE_TOOL_}" = "portupgrade" ] ; then \ portupgrade -f ${PORTUPGRADE_OPTIONS} ${PORTNAME} ; \ elif [ "${_PORTUPGRADE_TOOL_}" = "portmaster" ] ; then \ PAGER=/bin/cat portmaster -f ${PORTMASTER_OPTIONS} ${PORTNAME} ; \ fi stop : ${STARTUP_SCRIPT} stop start : ${STARTUP_SCRIPT} start restart : ${STARTUP_SCRIPT} restart reload : ${STARTUP_SCRIPT} reload