This document describes the layout of the OpenBSD ports for openHAB and how to submit patches to update them through the OpenBSD ports mailing list.
The OpenBSD ports for openHAB currently support multiple upstream major
versions and are maintained in the misc category.
The openHAB ports are split into two main components:
misc/openhab-- the openHAB runtimemisc/openhab-addons-- the openHAB add-ons distribution
Both ports support multiple major versions using versioned subdirectories.
misc/openhab
|-- 4
| |-- Makefile
| |-- distinfo
| `-- pkg
| `-- PLIST
|-- 5
| |-- Makefile
| |-- distinfo
| `-- pkg
| `-- PLIST
|-- Makefile
|-- Makefile.inc
|-- files
| `-- openhab.conf
`-- pkg
|-- DESCR
|-- README
`-- openhab.rc
Description of important files:
File Purpose
Makefile Main dispatcher for versioned
subdirectories
Makefile.inc Shared configuration and variables
used by versioned ports
4/ Port definition for openHAB 4.x
5/ Port definition for openHAB 5.x
distinfo Checksums for distfiles
pkg/PLIST Package packing list
files/openhab.conf Default configuration file
pkg/DESCR Package description
pkg/README Post-install documentation
misc/openhab-addons
|-- 4
| |-- Makefile
| |-- distinfo
| `-- pkg
| `-- PLIST
|-- 5
| |-- Makefile
| |-- distinfo
| `-- pkg
| `-- PLIST
|-- Makefile
|-- Makefile.inc
`-- pkg
|-- DESCR
`-- README
Description of important files:
File Purpose
Makefile Dispatcher for supported versions
Makefile.inc Shared variables
4/, 5/ Version-specific ports
distinfo Distfile checksums
pkg/PLIST Package file list
pkg/DESCR Package description
pkg/README Additional documentation
Updating the OpenBSD port usually involves:
- Updating the version in
Makefile.inc - Updating distfiles and checksums
- Regenerating or adjusting
PLIST - Testing the build and runtime
Typical workflow:
cd /usr/ports/misc/openhab/5
make makesum
make build
make fake
make plist
make packageTest the package locally before submitting.
OpenBSD ports contributions are typically submitted as unified diff patches against the ports tree.
Example:
cd /usr/ports
cvs diff -u misc/openhab > openhab-update.patchor with Git:
git diff misc/openhab misc/openhab-addons > openhab-update.patchEnsure the patch includes:
- Updated
MakefileorMakefile.inc - Updated
distinfo - Updated
PLISTif file lists changed
Send the patch to the OpenBSD ports mailing list:
ports@openbsd.org
Plain text email is preferred.
Subject: [PATCH] misc/openhab: update to 5.x
Hello ports,
Please find attached a patch updating misc/openhab and misc/openhab-addons
to the latest upstream version.
Changes:
- update openHAB to 5.x
- refresh distinfo
- update PLIST
Tested on:
OpenBSD 7.x amd64
Thanks
<your name>
Inline patch below the message.
Avoid HTML email.
Before submission, test:
- clean build
- package creation
- installation
- service startup
Example:
cd /usr/ports/misc/openhab/5 && doas make install
rcctl enable openhab
rcctl start openhabConfirm that the web UI and services operate correctly.
Helpful documentation:
- OpenBSD Porter's Handbook https://www.openbsd.org/faq/ports/
- Man pages bsd.port.mk(5)
- existing Java ports
If you plan to maintain the port long term, consider mentioning this in your email when submitting updates.