# $NetBSD: Makefile,v 1.6 2015/03/15 18:59:08 tnn Exp $ DISTNAME= drizztbsd-stompserver-1c7a275 PKGNAME= ${RUBY_PKGPREFIX}-stompserver-1.0.0 PKGREVISION= 1 CATEGORIES= net MAINTAINER= imil@NetBSD.org HOMEPAGE= http://stompserver.rubyforge.org/ COMMENT= Stomp messaging server LICENSE= mit MASTER_SITES= https://nodeload.github.com/drizztbsd/stompserver/tarball/ DISTFILES= 1c7a275272f14ba3ce9d4c7f27402e659f775498 # FETCH_OUTPUT_ARGS does not seem to work, we'll extract ourselves USE_TOOLS= gzip tar 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 WRKSRC= ${WRKDIR}/${DISTNAME} GEM_BUILD= rake GEM_NAME= stompserver-1.0.0 .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= ${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} do-extract: ${TAR} -zxf ${DISTDIR}/${DISTFILES} -C ${WRKDIR} post-install: ${INSTALL_DATA} ${WRKSRC}/config/stompserver.conf ${DESTDIR}${EGDIR} .include "../../lang/ruby/gem.mk" .include "../../mk/bsd.pkg.mk"