1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
# $NetBSD: Makefile,v 1.9 2018/07/04 13:40:30 jperkin Exp $
DISTNAME= drizztbsd-stompserver-1c7a275
PKGNAME= ${RUBY_PKGPREFIX}-stompserver-1.0.0
PKGREVISION= 2
CATEGORIES= net
MAINTAINER= imil@NetBSD.org
HOMEPAGE= https://github.com/drizzt/stompserver
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= pre-configure
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"
|