86 lines
3 KiB
Makefile
86 lines
3 KiB
Makefile
|
# $NetBSD: Makefile,v 1.1 2012/08/12 16:13:02 imil Exp $
|
||
|
|
||
|
DISTNAME= stompserver-0.9.9
|
||
|
CATEGORIES= net
|
||
|
|
||
|
MAINTAINER= imil@NetBSD.org
|
||
|
HOMEPAGE= http://stompserver.rubyforge.org/
|
||
|
COMMENT= Stomp messaging server
|
||
|
LICENSE= mit
|
||
|
|
||
|
DEPENDS+= ${RUBY_PKGPREFIX}-eventmachine>=0.12.10:../../devel/ruby-eventmachine
|
||
|
DEPENDS+= ${RUBY_PKGPREFIX}-hoe>=3.0.6:../../devel/hoe
|
||
|
DEPENDS+= ${RUBY_PKGPREFIX}-daemons>=1.1.8:../../misc/ruby-daemons
|
||
|
|
||
|
.include "../../mk/bsd.prefs.mk"
|
||
|
|
||
|
BUILD_DEFS+= VARBASE STOMPSERVER_WRKDIR
|
||
|
|
||
|
STOMPSERVER_WRKDIR?= ${VARBASE}/lib/stompserver
|
||
|
# It seems everything in this software is relative to "working_dir"
|
||
|
STOMPSERVER_LOGDIR?= log
|
||
|
STOMPSERVER_PIDDIR?= pid
|
||
|
STOMPSERVER_PIDFILE?= ${STOMPSERVER_PIDDIR}/stompserver.pid
|
||
|
STOMPSERVER_CFGDIR?= etc
|
||
|
STOMPSERVER_STORAGE?= storage
|
||
|
STOMPSERVER_USER?= stompserver
|
||
|
STOMPSERVER_GROUP?= stompserver
|
||
|
|
||
|
PKG_USERS_VARS+= STOMPSERVER_USER
|
||
|
PKG_GROUPS_VARS+= STOMPSERVER_GROUP
|
||
|
|
||
|
PKG_USERS= ${STOMPSERVER_USER}:${STOMPSERVER_GROUP}
|
||
|
PKG_GROUPS= ${STOMPSERVER_GROUP}
|
||
|
PKG_GECOS.${STOMPSERVER_USER}=stompserver server user
|
||
|
PKG_HOME.${STOMPSERVER_USER}=${STOMPSERVER_WRKDIR}
|
||
|
PKG_SHELL.${STOMPSERVER_USER}=${NOLOGIN}
|
||
|
|
||
|
EGDIR= ${DESTDIR}${PREFIX}/share/examples/stompserver
|
||
|
|
||
|
ST_ROOT= ${STOMPSERVER_WRKDIR}
|
||
|
|
||
|
CONF_FILES+= ${PREFIX}/share/examples/stompserver/stompserver.conf \
|
||
|
${ST_ROOT}/${STOMPSERVER_CFGDIR}/stompserver.conf
|
||
|
|
||
|
RCD_SCRIPTS= stompserver
|
||
|
|
||
|
INSTALLATION_DIRS= bin share/examples/stompserver
|
||
|
|
||
|
OWN_DIRS+= ${STOMPSERVER_WRKDIR} \
|
||
|
${ST_ROOT}/${STOMPSERVER_LOGDIR} \
|
||
|
${ST_ROOT}/${STOMPSERVER_STORAGE} \
|
||
|
${ST_ROOT}/${STOMPSERVER_PIDDIR} \
|
||
|
${ST_ROOT}/${STOMPSERVER_CFGDIR}
|
||
|
OWN_DIRS_PERMS+= ${STOMPSERVER_WRKDIR} \
|
||
|
${STOMPSERVER_USER} ${STOMPSERVER_GROUP} 0755
|
||
|
OWN_DIRS_PERMS+= ${ST_ROOT}/${STOMPSERVER_LOGDIR} \
|
||
|
${STOMPSERVER_USER} ${STOMPSERVER_GROUP} 0755
|
||
|
OWN_DIRS_PERMS+= ${ST_ROOT}/${STOMPSERVER_STORAGE} \
|
||
|
${STOMPSERVER_USER} ${STOMPSERVER_GROUP} 0700
|
||
|
OWN_DIRS_PERMS+= ${ST_ROOT}/${STOMPSERVER_PIDDIR} \
|
||
|
${STOMPSERVER_USER} ${STOMPSERVER_GROUP} 0755
|
||
|
OWN_DIRS_PERMS+= ${ST_ROOT}/${STOMPSERVER_CFGDIR} \
|
||
|
${STOMPSERVER_USER} ${STOMPSERVER_GROUP} 0700
|
||
|
|
||
|
SUBST_CLASSES+= cfg
|
||
|
SUBST_STAGE.cfg= post-patch
|
||
|
SUBST_FILES.cfg= config/stompserver.conf
|
||
|
SUBST_SED.cfg= -e 's,@STOMPSERVER_WRKDIR@,${STOMPSERVER_WRKDIR},g'
|
||
|
SUBST_SED.cfg+= -e 's,@STOMPSERVER_LOGDIR@,${STOMPSERVER_LOGDIR},g'
|
||
|
SUBST_SED.cfg+= -e 's,@STOMPSERVER_PIDFILE@,${STOMPSERVER_PIDFILE},g'
|
||
|
SUBST_SED.cfg+= -e 's,@STOMPSERVER_CFGDIR@,${STOMPSERVER_CFGDIR},g'
|
||
|
SUBST_SED.cfg+= -e 's,@STOMPSERVER_STORAGE@,${STOMPSERVER_STORAGE},g'
|
||
|
SUBST_SED.cfg+= -e 's,@STOMPSERVER_USER@,${STOMPSERVER_USER},g'
|
||
|
SUBST_SED.cfg+= -e 's,@STOMPSERVER_GROUP@,${STOMPSERVER_GROUP},g'
|
||
|
|
||
|
FILES_SUBST+= STOMPSERVER_RCD_CFG=${ST_ROOT}/${STOMPSERVER_CFGDIR}
|
||
|
FILES_SUBST+= STOMPSERVER_RCD_PID=${ST_ROOT}/${STOMPSERVER_PIDFILE}
|
||
|
|
||
|
MESSAGE_SUBST+= STOMPSERVER_WRKDIR=${STOMPSERVER_WRKDIR}
|
||
|
|
||
|
post-install:
|
||
|
${INSTALL_DATA} ${WRKSRC}/config/stompserver.conf ${EGDIR}
|
||
|
|
||
|
.include "../../lang/ruby/gem.mk"
|
||
|
.include "../../mk/bsd.pkg.mk"
|