# $Id: Portfile 71637 2010-09-18 18:35:27Z nick@macports.org $

PortSystem 1.0

name			beanstalkd
version			1.4.6
revision		1
description		a fast, distributed, in-memory workqueue service
long_description	\
	beanstalkd is a fast, distributed, in-memory workqueue service. \
	Its interface is generic, but is intended for use in reducing the \
	latency of page views in high-volume web applications by running most \
	time-consuming tasks asynchronously.
maintainers		nick
categories		sysutils
platforms		darwin
homepage		http://xph.us/software/beanstalkd/
master_sites		http://xph.us/dist/beanstalkd/
checksums		md5 3dbbb64a6528efaaaa841ea83b30768e \
			sha1 1ee0d731e22aa45fb22e816f6e364913595f6e65 \
			rmd160 f1641f15b32731f19a39721d8b37da940a145672

depends_lib		port:libevent \
			port:gmake

configure.args      --prefix=${prefix} \
                    --with-event=${prefix}

startupitem.create      yes
startupitem.executable  ${prefix}/bin/beanstalkd -u nobody

post-activate {
    ui_msg "###########################################################"
    ui_msg "# To launch beanstalkd manually, run:"
    ui_msg "# "
    ui_msg "# sudo launchctl load -w /Library/LaunchDaemons/org.macports.beanstalkd.plist"
    ui_msg "# "
    ui_msg "# and to stop beanstalkd, run:"
    ui_msg "# "
    ui_msg "# sudo launchctl unload -w /Library/LaunchDaemons/org.macports.beanstalkd.plist"
    ui_msg "###########################################################"
}
