PORTNAME=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 -include Makefile.local #_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_port_core : echo "# replace port directory with original port" rsync -avz --delete --exclude "README.html" --exclude "*/README.html" core/ ${PORTDIR} patch_port : replace_port_core echo "# patch port directory files" /bin/sh -c ' \ if [ -d ${CURDIR}/files ] ; then \ rsync -av --exclude "README.html" --exclude "*/README.html" ${CURDIR}/files/ ${PORTDIR}/files/ ; \ fi ; \ if [ -d ${CURDIR}/files-port ] ; then \ rsync -av --exclude "README.html" --exclude "*/README.html" ${CURDIR}/files-port/ ${PORTDIR}/ ; \ if [ -f ${CURDIR}/files-port/Makefile.local ] ; then \ cp -p ${CURDIR}/files-port/Makefile.local ${PORTDIR}/Makefile.local ; \ fi ; \ fi ; \ cd ${PORTDIR} ; \ if [ -d ${CURDIR}/patches-port ] ; then \ for patch in ${CURDIR}/patches-port/*.patch ; do \ echo "patch < $${patch}" ; \ patch < $${patch} ; \ done ; \ fi ; \ ' fix_port : echo "# fix port directory files" replace_port : patch_port fix_port replace : replace_port showconfig : port_showconfig config : port_config clean : port_clean fetch : port_fetch extract : port_extract build : port_patch port_build install : port_install deinstall : port_deinstall portupgrade : patch echo "# portupgrade port" if [ "${_PORTUPGRADE_TOOL_}" = "portupgrade" ] ; then \ WITH="${PORT_OPTIONS_WITH}" WITHOUT="${PORT_OPTIONS_WITHOUT}" portupgrade ${PORTUPGRADE_OPTIONS} ${PORTNAME} ; \ elif [ "${_PORTUPGRADE_TOOL_}" = "portmaster" ] ; then \ WITH="${PORT_OPTIONS_WITH}" WITHOUT="${PORT_OPTIONS_WITHOUT}" PAGER=/bin/cat portmaster ${PORTMASTER_OPTIONS} ${PORTNAME} ; \ fi force_portupgrade : portupgrade_force portupgrade_force : patch echo "# force portupgrade port" if [ "${_PORTUPGRADE_TOOL_}" = "portupgrade" ] ; then \ portupgrade -f ${PORTUPGRADE_OPTIONS} ${PORTNAME} ; \ elif [ "${_PORTUPGRADE_TOOL_}" = "portmaster" ] ; then \ PAGER=/bin/cat portmaster -f ${PORTMASTER_OPTIONS} ${PORTNAME} ; \ fi port_showconfig : echo "# show configurable port options" /bin/sh -c 'cd ${PORTDIR} ; ${PORT_OPTIONS} make showconfig WITH="${PORT_OPTIONS_WITH}" WITHOUT="${PORT_OPTIONS_WITHOUT}"' port_config : echo "# configure port options" /bin/sh -c 'cd ${PORTDIR} ; ${PORT_OPTIONS} make config WITH="${PORT_OPTIONS_WITH}" WITHOUT="${PORT_OPTIONS_WITHOUT}"' port_clean : echo "# clean port" /bin/sh -c 'cd ${PORTDIR} ; ${PORT_OPTIONS} make clean WITH="${PORT_OPTIONS_WITH}" WITHOUT="${PORT_OPTIONS_WITHOUT}"' port_fetch : echo "# fetch port" /bin/sh -c 'cd ${PORTDIR} ; ${PORT_OPTIONS} make fetch WITH="${PORT_OPTIONS_WITH}" WITHOUT="${PORT_OPTIONS_WITHOUT}"' port_extract : echo "# extract port" /bin/sh -c 'cd ${PORTDIR} ; ${PORT_OPTIONS} make extract WITH="${PORT_OPTIONS_WITH}" WITHOUT="${PORT_OPTIONS_WITHOUT}"' port_patch : patch echo "# patch port" /bin/sh -c 'cd ${PORTDIR} ; ${PORT_OPTIONS} make patch WITH="${PORT_OPTIONS_WITH}" WITHOUT="${PORT_OPTIONS_WITHOUT}"' port_build : patch echo "# build port" /bin/sh -c 'cd ${PORTDIR} ; ${PORT_OPTIONS} make build WITH="${PORT_OPTIONS_WITH}" WITHOUT="${PORT_OPTIONS_WITHOUT}"' port_install : echo "# install port" /bin/sh -c 'cd ${PORTDIR} ; ${PORT_OPTIONS} make install WITH="${PORT_OPTIONS_WITH}" WITHOUT="${PORT_OPTIONS_WITHOUT}"' port_deinstall : echo "# deinstall port" /bin/sh -c 'cd ${PORTDIR} ; ${PORT_OPTIONS} make deinstall WITH="${PORT_OPTIONS_WITH}" WITHOUT="${PORT_OPTIONS_WITHOUT}"' stop : [ ! -z "${STARTUP_SCRIPT}" ] && [ -x "${STARTUP_SCRIPT}" ] && ${STARTUP_SCRIPT} stop start : [ ! -z "${STARTUP_SCRIPT}" ] && [ -x "${STARTUP_SCRIPT}" ] && ${STARTUP_SCRIPT} start restart : [ ! -z "${STARTUP_SCRIPT}" ] && [ -x "${STARTUP_SCRIPT}" ] && ${STARTUP_SCRIPT} restart reload : [ ! -z "${STARTUP_SCRIPT}" ] && [ -x "${STARTUP_SCRIPT}" ] && ${STARTUP_SCRIPT} reload status : [ ! -z "${STARTUP_SCRIPT}" ] && [ -x "${STARTUP_SCRIPT}" ] && ${STARTUP_SCRIPT} status