aboutsummaryrefslogtreecommitdiff
path: root/misc/openhab2/Makefile
diff options
context:
space:
mode:
authorAlexander Leidinger <netchild@FreeBSD.org>2018-04-13 09:25:29 +0000
committerAlexander Leidinger <netchild@FreeBSD.org>2018-04-13 09:25:29 +0000
commit37362f3456217fa270402c18f1437ff32081bfaa (patch)
tree74f589b50059f42ed05c27a6aaa18860225dcf82 /misc/openhab2/Makefile
parent07d785af1904bf93959b759a1146298cd4ff1582 (diff)
downloadports-37362f3456217fa270402c18f1437ff32081bfaa.tar.gz
ports-37362f3456217fa270402c18f1437ff32081bfaa.zip
Notes
Diffstat (limited to 'misc/openhab2/Makefile')
-rw-r--r--misc/openhab2/Makefile62
1 files changed, 62 insertions, 0 deletions
diff --git a/misc/openhab2/Makefile b/misc/openhab2/Makefile
new file mode 100644
index 000000000000..f511ba67abc8
--- /dev/null
+++ b/misc/openhab2/Makefile
@@ -0,0 +1,62 @@
+# Created by: Alexander Leidinger
+# $FreeBSD$
+
+PORTNAME= openhab2
+PORTVERSION= 2.2.0
+CATEGORIES= misc java
+MASTER_SITES= https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F${PORTVERSION}/
+DISTNAME= openhab-${PORTVERSION}
+
+MAINTAINER= netchild@FreeBSD.org
+COMMENT= Vendor and technology agnostic open source smart-home software
+
+LICENSE= EPL
+LICENSE_FILE= ${WRKSRC}/LICENSE.TXT
+
+USE_JAVA= yes
+JAVA_VERSION= 1.8
+JAVA_RUN= yes
+
+USERS= openhab
+GROUPS= openhab
+USE_RC_SUBR= openhab2
+SUB_FILES= pkg-message
+
+NO_WRKSUBDIR= yes
+
+post-patch:
+ ${REINPLACE_CMD} -e "s:%%LOCALBASE%%:${LOCALBASE}:g" ${WRKSRC}/runtime/bin/setenv
+
+do-build:
+.for conf in services/runtime.cfg services/addons.cfg html/index.html transform/en.map transform/de.map
+ ${MV} ${WRKSRC}/conf/${conf} ${WRKSRC}/conf/${conf}.sample
+.endfor
+ ${RM} -r ${WRKSRC}/runtime/bin/contrib
+ ${RM} ${WRKSRC}/*.ps1 ${WRKSRC}/*.bat ${WRKSRC}/runtime/bin/*.ps1 ${WRKSRC}/runtime/bin/*.bat
+
+do-install:
+ ${MKDIR} ${STAGEDIR}${PREFIX}/etc/${PORTNAME}
+ ${MKDIR} ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}
+ ${MKDIR} ${STAGEDIR}${PREFIX}/share/${PORTNAME}
+ ${MKDIR} ${STAGEDIR}/var/log/${PORTNAME}
+ ${MKDIR} ${STAGEDIR}/var/db/${PORTNAME}
+ ${MKDIR} ${STAGEDIR}/var/db/${PORTNAME}/home
+ ${MKDIR} ${STAGEDIR}/var/db/${PORTNAME}/persistence
+ ${MKDIR} ${STAGEDIR}/var/db/${PORTNAME}/persistence/db4o
+ ${MKDIR} ${STAGEDIR}/var/db/${PORTNAME}/persistence/rrd4j
+ ${MKDIR} ${STAGEDIR}/var/db/${PORTNAME}/persistence/mapdb
+ ${MKDIR} ${STAGEDIR}/var/db/${PORTNAME}/backups
+ ${MKDIR} ${STAGEDIR}/var/db/${PORTNAME}/userdata
+ ${MKDIR} ${STAGEDIR}/var/db/${PORTNAME}/userdata/etc
+ ${MKDIR} ${STAGEDIR}/var/db/${PORTNAME}/userdata/etc/scripts
+ ${MKDIR} ${STAGEDIR}/var/db/${PORTNAME}/userdata/tmp
+ ${MKDIR} ${STAGEDIR}/var/run/${PORTNAME}
+ (cd ${WRKSRC}/conf && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/etc/${PORTNAME})
+ (cd ${WRKSRC} && ${COPYTREE_BIN} runtime ${STAGEDIR}${PREFIX}/libexec/${PORTNAME})
+ (cd ${WRKSRC} && ${COPYTREE_BIN} addons ${STAGEDIR}${PREFIX}/libexec/${PORTNAME})
+.for script in start.sh start_debug.sh
+ ${INSTALL_SCRIPT} ${WRKSRC}/${script} ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}/
+.endfor
+ (cd ${WRKSRC}/userdata && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/share/${PORTNAME})
+
+.include <bsd.port.mk>