Commit 645d2cac authored by Rene Ladan's avatar Rene Ladan
Browse files

misc/openhab2: Remove expired port

2025-12-31 misc/openhab2: superseeded by misc/openhab
parent b7d12c63
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4968,3 +4968,4 @@ www/shellinabox|sysutils/ttyd|2025-12-31|Has expired: Abandonware and outdated,
security/krb5-120||2025-12-31|Has expired: Now that MIT KRB5 1.22 is GA 1.20 is EOL
games/keeperrl||2025-12-31|Has expired: Very outdated, fails to build and unmaintained in tree for years
misc/openhab2-addons|misc/openhab-addons|2025-12-31|Has expired: superseeded by misc/openhab-addons
misc/openhab2|misc/openhab|2025-12-31|Has expired: superseeded by misc/openhab
+0 −1
Original line number Diff line number Diff line
@@ -319,7 +319,6 @@
    SUBDIR += opencyc
    SUBDIR += openhab
    SUBDIR += openhab-addons
    SUBDIR += openhab2
    SUBDIR += openhantek
    SUBDIR += openhmd
    SUBDIR += openmvg

misc/openhab2/Makefile

deleted100644 → 0
+0 −83
Original line number Diff line number Diff line
PORTNAME=	openhab2
PORTVERSION=	2.5.12
PORTREVISION=	0
CATEGORIES=	misc java
MASTER_SITES=	https://openhab.jfrog.io/artifactory/libs-release-local/org/openhab/distro/openhab/${PORTVERSION}/
DISTNAME=	openhab-${PORTVERSION}

MAINTAINER=	netchild@FreeBSD.org
COMMENT=	Vendor and technology agnostic open source smart-home software
WWW=		https://www.openhab.org/

LICENSE=	EPL
LICENSE_FILE=	${WRKSRC}/LICENSE.TXT

DEPRECATED=	superseeded by misc/openhab
EXPIRATION_DATE=2025-12-31

USES=		cpe java zip
JAVA_VERSION=	8
USE_RC_SUBR=	openhab2

SUB_FILES=	pkg-message update.freebsd
NO_WRKSUBDIR=	yes
NO_ARCH=	yes

CPE_PRODUCT=	openhab

USERS=	openhab
GROUPS=	openhab

PLIST_SUB=	PORTVERSION=${PORTVERSION}

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 \
	    ${WRKSRC}/runtime/bin/*.psm1 \
	    ${WRKSRC}/runtime/bin/setenv.bak \
	    ${WRKSRC}/runtime/bin/setenv.orig

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
	${INSTALL_SCRIPT} ${WRKDIR}/update.freebsd ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}/runtime/bin/
	(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
	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
	echo "@dir /var/log/${PORTNAME}" >>pkg-plist.new
	echo "@dir /var/run/${PORTNAME}" >>pkg-plist.new

.include <bsd.port.mk>

misc/openhab2/distinfo

deleted100644 → 0
+0 −3
Original line number Diff line number Diff line
TIMESTAMP = 1624176344
SHA256 (openhab-2.5.12.zip) = 681007f4ddeba4e06c2f83b03dfb0ece5ffa4d35708db965d565b332fae7f1c7
SIZE (openhab-2.5.12.zip) = 83479526

misc/openhab2/files/openhab2.in

deleted100644 → 0
+0 −90
Original line number Diff line number Diff line
#!/bin/sh

# PROVIDE: openhab2
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# openhab2_enable (bool):	Set to NO by default.
#				Set it to YES to enable openhab2.
# openhab2_user (username):	Set to openhab by default.
# openhab2_group (groupname):	Set to openhab by default.
# openhab2_http_port (port):	Set to 8080 by default.
# openhab2_https_port (port):	Set to 8443 by default.
# openhab2_listen_address (IP):	Set to 0.0.0.0 for http/https by default.
# openhab2_backup_dir (path):	Set to /var/db/openhab2/backups by default.
# openhab2_java_opts (string):	Empty by default. You can add additional java
#				options like -Duser.timezone=Europe/Berlin and/or
#				-Dgnu.io.rxtx.SerialPorts=/dev/cuau0
# openhab2_home_dir (path):	Set to %%PREFIX%%/libexec/openhab2 by default.
# openhab2_conf_dir (path):	Set to %%PREFIX%%/etc/openhab2 by default.
# openhab2_runtime_dir (path):	Set to %%PREFIX%%/libexec/openhab2/runtime by default.
# openhab2_userdata_dir (path):	Set to /var/db/openhab2/userdata by default.
# openhab2_log_dir (path):	Set to /var/log/openhab2 by default.

. /etc/rc.subr

name=openhab2
rcvar=openhab2_enable

load_rc_config $name

: ${openhab2_enable:="NO"}
: ${openhab2_user:="openhab"}
: ${openhab2_group:="openhab"}
: ${openhab2_http_port:="8080"}
: ${openhab2_https_port:="8443"}
: ${openhab2_listen_address:="0.0.0.0"}
: ${openhab2_backup_dir:="/var/db/openhab2/backups"}
: ${openhab2_home_dir:="%%PREFIX%%/libexec/openhab2"}
: ${openhab2_conf_dir:="%%PREFIX%%/etc/openhab2"}
: ${openhab2_runtime_dir:="%%PREFIX%%/libexec/openhab2/runtime"}
: ${openhab2_userdata_dir:="/var/db/openhab2/userdata"}
: ${openhab2_log_dir:="/var/log/openhab2"}

export OPENHAB_USER="${openhab2_user}"
export OPENHAB_GROUP="${openhab2_group}"
export OPENHAB_HTTP_PORT="${openhab2_http_port}"
export OPENHAB_HTTPS_PORT="${openhab2_https_port}"
export OPENHAB_HTTP_ADDRESS="${openhab2_listen_address}"
export OPENHAB_BACKUPS="${openhab2_backup_dir}"
export EXTRA_JAVA_OPTS="-Dsun.nio.fs.watchservice=polling ${openhab2_java_opts}"
export OPENHAB_HOME="${openhab2_home_dir}"
export OPENHAB_CONF="${openhab2_conf_dir}"
export OPENHAB_RUNTIME="${openhab2_runtime_dir}"
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

command=/usr/sbin/daemon
command_args="-p ${pidfile} -t openhab2 ${OPENHAB_HOME}/start.sh server"

openhab2_stop() {
	${OPENHAB_RUNTIME}/bin/stop
	if [ -e ${pidfile} ]; then
		wait_for_pids $(cat ${pidfile})
	fi
}

openhab2_status() {
	case "$(${OPENHAB_RUNTIME}/bin/status 2>&1)" in
		"Not Running ...")
			echo ${name} is not running,
			;;
		"Running ...")
			echo ${name} is running.
			;;
	esac
}

stop_cmd="openhab2_stop"
status_cmd="openhab2_status"


run_rc_command "$1"
Loading