aboutsummaryrefslogtreecommitdiff
path: root/databases/leo_center/Makefile
diff options
context:
space:
mode:
authorMikolaj Golub <trociny@FreeBSD.org>2014-07-06 17:51:27 +0000
committerMikolaj Golub <trociny@FreeBSD.org>2014-07-06 17:51:27 +0000
commit7b708a2a9169b6cec5a47d32ac02faa832daa478 (patch)
treed2a642d9d41d998bc1e9fb98181709a3112213d9 /databases/leo_center/Makefile
parent16808ee94d4a2a1a677b8248ec8ede91763f8082 (diff)
downloadports-7b708a2a9169b6cec5a47d32ac02faa832daa478.tar.gz
ports-7b708a2a9169b6cec5a47d32ac02faa832daa478.zip
Notes
Diffstat (limited to 'databases/leo_center/Makefile')
-rw-r--r--databases/leo_center/Makefile67
1 files changed, 67 insertions, 0 deletions
diff --git a/databases/leo_center/Makefile b/databases/leo_center/Makefile
new file mode 100644
index 000000000000..2770e79ccef8
--- /dev/null
+++ b/databases/leo_center/Makefile
@@ -0,0 +1,67 @@
+# Created by: Mikolaj Golub <trociny@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= leo_center
+PORTVERSION= 0.4.10
+CATEGORIES= databases
+
+MAINTAINER= trociny@FreeBSD.org
+COMMENT= LeoFS Web console
+
+LICENSE= APACHE20
+
+USE_GITHUB= yes
+GH_ACCOUNT= leo-project
+GH_PROJECT= leo_center
+GH_TAGNAME= f7b6570
+GH_COMMIT= f7b6570
+
+DIST_SUBDIR= leofs
+
+RUN_DEPENDS= rubygem-haml>=0:${PORTSDIR}/www/rubygem-haml \
+ rubygem-leo_manager_client>=0.4.10:${PORTSDIR}/databases/rubygem-leo_manager_client \
+ rubygem-sinatra-contrib>=0:${PORTSDIR}/www/rubygem-sinatra-contrib \
+ rubygem-sinatra>=1.4.3:${PORTSDIR}/www/rubygem-sinatra \
+ rubygem-thin>=0:${PORTSDIR}/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_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>