misc/openhab2*: switch to new download location, specify JAVA_VERSION

- switch to new download location (and zip instead of tgz)
- set JAVA_VERSION in the start script, to allow coexistence with
  the upcoming v3 port
- while I'm here, please portlint a little bit in maintainer specifc parts
This commit is contained in:
Alexander Leidinger 2021-06-20 10:54:49 +02:00
parent 1b62862f14
commit 942a4d428e
5 changed files with 18 additions and 20 deletions

View file

@ -1,9 +1,7 @@
# Created by: Alexander Leidinger
PORTNAME= openhab2-addons
PORTVERSION= 2.5.11
PORTVERSION= 2.5.12
CATEGORIES= misc java
MASTER_SITES= https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab-addons%2F${PORTVERSION}/
MASTER_SITES= https://openhab.jfrog.io/artifactory/libs-release-local/org/openhab/distro/openhab-addons//${PORTVERSION}/
DISTNAME= openhab-addons-${PORTVERSION}
EXTRACT_SUFX= .kar

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1607929665
SHA256 (openhab-addons-2.5.11.kar) = 400b1272f7eef2e2c565df6fee7a2fab098dfdfe623c525436b67154a1f07a1c
SIZE (openhab-addons-2.5.11.kar) = 199393963
TIMESTAMP = 1620371585
SHA256 (openhab-addons-2.5.12.kar) = 6544a323af11f577dde736f6942c5833879d0b41770700fcc667a188755c6cce
SIZE (openhab-addons-2.5.12.kar) = 199511513

View file

@ -1,10 +1,8 @@
# Created by: Alexander Leidinger
PORTNAME= openhab2
PORTVERSION= 2.5.11
PORTREVISION= 0
PORTVERSION= 2.5.12
#PORTREVISION= 0
CATEGORIES= misc java
MASTER_SITES= https://bintray.com/openhab/mvn/download_file?file_path=org%2Fopenhab%2Fdistro%2Fopenhab%2F${PORTVERSION}/
MASTER_SITES= https://openhab.jfrog.io/artifactory/libs-release-local/org/openhab/distro/openhab/${PORTVERSION}/
DISTNAME= openhab-${PORTVERSION}
MAINTAINER= netchild@FreeBSD.org
@ -13,6 +11,7 @@ COMMENT= Vendor and technology agnostic open source smart-home software
LICENSE= EPL
LICENSE_FILE= ${WRKSRC}/LICENSE.TXT
USES= zip
USE_JAVA= yes
JAVA_VERSION= 1.8
JAVA_RUN= yes
@ -66,13 +65,13 @@ do-install:
(cd ${WRKSRC}/userdata && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/share/${PORTNAME})
gen-plist:
${FIND} ${STAGEDIR} -type f | sed -e "s:${STAGEDIR}${PREFIX}/::g ; s:${PORTVERSION}:%%PORTVERSION%%:g" | sort -u | grep libexec/ >pkg-plist.new
${FIND} ${STAGEDIR} -type f | ${SED} -e "s:${STAGEDIR}${PREFIX}/::g ; s:${PORTVERSION}:%%PORTVERSION%%:g" | ${SORT} -u | ${GREP} libexec/ >pkg-plist.new
echo '@owner openhab' >>pkg-plist.new
echo '@group openhab' >>pkg-plist.new
${FIND} ${STAGEDIR}${DATADIR} -type f | sed -E -e "s:${STAGEDIR}${DATADIR}/(.*):@sample %%DATADIR%%/\\1 /var/db/openhab2/userdata/\\1:g ; s:${PORTVERSION}:%%PORTVERSION%%:g" | sort -u >>pkg-plist.new
${FIND} ${STAGEDIR}${ETCDIR} -type d | sort -u | sed -e "s:${STAGEDIR}${ETCDIR}:@dir %%ETCDIR%%:g ; s:${PORTVERSION}:%%PORTVERSION%%:g" >>pkg-plist.new
${FIND} ${STAGEDIR}${ETCDIR} -type f | sort -u | sed -E -e "s:${STAGEDIR}${ETCDIR}/:%%ETCDIR%%/:g ; s:${PORTVERSION}:%%PORTVERSION%%:g ; s:(.*.sample)$:@sample(openhab,openhab,640) \\1:" >>pkg-plist.new
${FIND} ${STAGEDIR}/var/db/${PORTNAME} -type d | sort -ru | sed -e "s:${STAGEDIR}:@dir :g" >>pkg-plist.new
${FIND} ${STAGEDIR}${DATADIR} -type f | ${SED} -E -e "s:${STAGEDIR}${DATADIR}/(.*):@sample %%DATADIR%%/\\1 /var/db/openhab2/userdata/\\1:g ; s:${PORTVERSION}:%%PORTVERSION%%:g" | ${SORT} -u >>pkg-plist.new
${FIND} ${STAGEDIR}${ETCDIR} -type d | ${SORT} -u | ${SED} -e "s:${STAGEDIR}${ETCDIR}:@dir %%ETCDIR%%:g ; s:${PORTVERSION}:%%PORTVERSION%%:g" >>pkg-plist.new
${FIND} ${STAGEDIR}${ETCDIR} -type f | ${SORT} -u | ${SED} -E -e "s:${STAGEDIR}${ETCDIR}/:%%ETCDIR%%/:g ; s:${PORTVERSION}:%%PORTVERSION%%:g ; s:(.*.sample)$:@sample(openhab,openhab,640) \\1:" >>pkg-plist.new
${FIND} ${STAGEDIR}/var/db/${PORTNAME} -type d | ${SORT} -ru | ${SED} -e "s:${STAGEDIR}:@dir :g" >>pkg-plist.new
echo "@dir /var/log/${PORTNAME}" >>pkg-plist.new
echo "@dir /var/run/${PORTNAME}" >>pkg-plist.new

View file

@ -1,3 +1,3 @@
TIMESTAMP = 1607929490
SHA256 (openhab-2.5.11.tar.gz) = edff418da20464fc3fbc28f9790b122c53ddb8a53bf4f79041a7645c0ba49ac8
SIZE (openhab-2.5.11.tar.gz) = 83126702
TIMESTAMP = 1624176344
SHA256 (openhab-2.5.12.zip) = 681007f4ddeba4e06c2f83b03dfb0ece5ffa4d35708db965d565b332fae7f1c7
SIZE (openhab-2.5.12.zip) = 83479526

View file

@ -58,6 +58,7 @@ export OPENHAB_USERDATA="${openhab2_userdata_dir}"
export OPENHAB_LOGDIR="${openhab2_log_dir}"
# for UTF-8 encoding, language can be set inside openhab:
export LC_ALL=en_US.UTF-8
export JAVA_VERSION=8
pidfile=/var/run/${name}/${name}.pid