This is a new port for autorandr. This is a simple-ish Python script that wraps xrandr and lets you automate xrandr actions as you unplug monitors etc.
Tested on my machine (amd64) running current. Port patches, builds and installs successfully. Installed executable runs, `man autorandr` also works. Checkpatch is clean. Any feedback greatly appreciated. - ajf diff --git a/sysutils/autorandr/Makefile b/sysutils/autorandr/Makefile new file mode 100644 index 00000000000..6b94a3e6cb8 --- /dev/null +++ b/sysutils/autorandr/Makefile @@ -0,0 +1,29 @@ +# $OpenBSD: Makefile,v 1.13 2019/11/10 16:25:41 kmos Exp $ + +COMMENT= automates xrandr calls based on connect devices + +MODPY_EGG_VERSION= 1.10.1 +DISTNAME= autorandr-${MODPY_EGG_VERSION} +CATEGORIES= sysutils + +GH_ACCOUNT=phillipberndt +GH_PROJECT=autorandr +GH_TAGNAME=${MODPY_EGG_VERSION} + +# GPLv3 +PERMIT_PACKAGE= Yes + +MAINTAINER=Ashton Fagg <ash...@fagg.id.au> + +MODULES= lang/python +MODPY_SETUPTOOLS = Yes + +# No tests provided by upstream. +NO_TEST= Yes + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/autorandr.py ${PREFIX}/bin/autorandr + ${INSTALL_MAN} ${WRKSRC}/autorandr.1 ${PREFIX}/man/man1/autorandr.1 + + +.include <bsd.port.mk> diff --git a/sysutils/autorandr/distinfo b/sysutils/autorandr/distinfo new file mode 100644 index 00000000000..b1bbff68d4b --- /dev/null +++ b/sysutils/autorandr/distinfo @@ -0,0 +1,2 @@ +SHA256 (autorandr-1.10.1.tar.gz) = Iw+589W/VEolR8Advdo5gSlEzdVGWmebuWF2nH3bVSw= +SIZE (autorandr-1.10.1.tar.gz) = 48043 diff --git a/sysutils/autorandr/patches/patch-autorandr_py b/sysutils/autorandr/patches/patch-autorandr_py new file mode 100644 index 00000000000..0823effa05c --- /dev/null +++ b/sysutils/autorandr/patches/patch-autorandr_py @@ -0,0 +1,11 @@ +$OpenBSD$ + +Index: autorandr.py +--- autorandr.py.orig ++++ autorandr.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python2 + # encoding: utf-8 + # + # autorandr.py diff --git a/sysutils/autorandr/pkg/DESCR b/sysutils/autorandr/pkg/DESCR new file mode 100644 index 00000000000..770c46b8094 --- /dev/null +++ b/sysutils/autorandr/pkg/DESCR @@ -0,0 +1 @@ +Automates xrandr actions. diff --git a/sysutils/autorandr/pkg/PLIST b/sysutils/autorandr/pkg/PLIST new file mode 100644 index 00000000000..2e887db21a3 --- /dev/null +++ b/sysutils/autorandr/pkg/PLIST @@ -0,0 +1,3 @@ +@comment $OpenBSD: PLIST,v$ +bin/autorandr +@man man/man1/autorandr.1