blob: 6dbf0eba11969878e94d8961494f4158ed4711bc (
plain)
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
|
# Created by: Mikolaj Golub <trociny@FreeBSD.org>
# $FreeBSD$
PORTNAME= leo_center
PORTVERSION= 0.4.70
CATEGORIES= databases
MAINTAINER= trociny@FreeBSD.org
COMMENT= LeoFS Web console
LICENSE= APACHE20
USE_GITHUB= yes
GH_ACCOUNT= leo-project
GH_TAGNAME= ${PORTVERSION:C/0$//}
DIST_SUBDIR= leofs
RUN_DEPENDS= rubygem-haml>=0:www/rubygem-haml \
rubygem-leo_manager_client>=0.4.13:databases/rubygem-leo_manager_client \
rubygem-sinatra-contrib>=0:www/rubygem-sinatra-contrib \
rubygem-sinatra>=1.4.3:www/rubygem-sinatra \
rubygem-thin>=0:www/rubygem-thin
USE_RC_SUBR= ${PORTNAME}
LEOFS_USER= leofs
LEOFS_GROUP= leofs
USERS= ${LEOFS_USER}
GROUPS= ${LEOFS_GROUP}
ETCDIR= ${PREFIX}/etc/leofs
LEOFS_LOGDIR= /var/log/leofs
LEOFS_RUNDIR= /var/run/leofs
PLIST_SUB+= LEOFS_USER=${LEOFS_USER} \
LEOFS_GROUP=${LEOFS_GROUP} \
LEOFS_LOGDIR=${LEOFS_LOGDIR} \
LEOFS_RUNDIR=${LEOFS_RUNDIR}
SUB_LIST+= LEOFS_USER=${LEOFS_USER} \
LEOFS_GROUP=${LEOFS_GROUP} \
LEOFS_LOGDIR=${LEOFS_LOGDIR} \
LEOFS_RUNDIR=${LEOFS_RUNDIR}
NO_ARCH= yes
NO_BUILD= yes
post-patch:
@${REINPLACE_CMD} \
's|config_file = .*|config_file = "${ETCDIR}/${PORTNAME}.conf"|' \
${WRKSRC}/lib/helpers.rb
@${REINPLACE_CMD} \
's|#{settings.root}/log/|${LEOFS_LOGDIR}/${PORTNAME}_|' \
${WRKSRC}/app.rb
do-install:
${MKDIR} ${STAGEDIR}${DATADIR} ${STAGEDIR}${ETCDIR} \
${STAGEDIR}${LEOFS_LOGDIR} ${STAGEDIR}${LEOFS_RUNDIR}
(cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR} \
'! -regex .*/log$$ ! -regex .*/log/.*$$ ! -regex .*/.git.*$$ ! -regex .*\.bak ! -regex .*\.orig')
${INSTALL_DATA} ${WRKSRC}/config.yml \
${STAGEDIR}${ETCDIR}/${PORTNAME}.conf.sample
.include <bsd.port.mk>
|