Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Aug 2019 15:05:59 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r508179 - in head/sysutils/solaar: . files
Message-ID:  <201908051505.x75F5xWw002059@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Mon Aug  5 15:05:59 2019
New Revision: 508179
URL: https://svnweb.freebsd.org/changeset/ports/508179

Log:
  sysutils/solaar: Update to 1.0.1
  
  - Add an awk script that converts the udev rules to a devd config at
    build time and drop the manually maintained file
  - Follow GitHub account rename
  
  Changes:	https://github.com/pwr/Solaar/compare/0.9.2-259-gc07c115...1.0.1
  Changes:	https://github.com/pwr-Solaar/Solaar/releases

Added:
  head/sysutils/solaar/files/devd-solaar.awk   (contents, props changed)
Deleted:
  head/sysutils/solaar/files/devd-solaar.conf
Modified:
  head/sysutils/solaar/Makefile
  head/sysutils/solaar/distinfo
  head/sysutils/solaar/pkg-descr

Modified: head/sysutils/solaar/Makefile
==============================================================================
--- head/sysutils/solaar/Makefile	Mon Aug  5 14:49:57 2019	(r508178)
+++ head/sysutils/solaar/Makefile	Mon Aug  5 15:05:59 2019	(r508179)
@@ -1,13 +1,7 @@
 # $FreeBSD$
 
 PORTNAME=	solaar
-# The latest release is from 2013 and there is not going to be a new
-# release for now:
-# https://github.com/pwr/Solaar/issues/288
-# https://github.com/pwr/Solaar/issues/296
-DISTVERSION=	0.9.2-259
-PORTREVISION=	1
-DISTVERSIONSUFFIX=	-gc07c115
+DISTVERSION=	1.0.1
 CATEGORIES=	sysutils
 
 MAINTAINER=	tobik@FreeBSD.org
@@ -21,15 +15,16 @@ RUN_DEPENDS=	${LOCALBASE}/lib/libhidapi.so:comms/hidap
 
 USES=		python
 USE_GITHUB=	yes
-GH_ACCOUNT=	pwr
+GH_ACCOUNT=	pwr-Solaar
 GH_PROJECT=	Solaar
-USE_PYTHON=	distutils autoplist concurrent optsuffix
+USE_PYTHON=	autoplist concurrent distutils optsuffix
 
 NO_ARCH=	yes
 
 OPTIONS_DEFINE=	GUI
+
 GUI_USES=	gnome
-GUI_USE=	gnome=pygobject3:run
+GUI_USE=	GNOME=pygobject3:run
 
 post-patch:
 	@${CP} ${FILESDIR}/hidapi.py ${WRKSRC}/lib/hidapi/udev.py
@@ -41,8 +36,13 @@ post-patch:
 	@${REINPLACE_CMD} 's|[[:<:]]cmd[[:>:]]|action|' \
 		${WRKSRC}/lib/solaar/cli/__init__.py
 
+post-build:
+	${AWK} -f ${FILESDIR}/devd-solaar.awk \
+		${WRKSRC}/rules.d/42-logitech-unify-permissions.rules \
+		> ${WRKDIR}/solaar.conf.sample
+
 post-install:
-	${INSTALL_DATA} ${FILESDIR}/devd-solaar.conf \
-		${STAGEDIR}${PREFIX}/etc/devd/solaar.conf.sample
+	${INSTALL_DATA} ${WRKDIR}/solaar.conf.sample \
+		${STAGEDIR}${PREFIX}/etc/devd
 
 .include <bsd.port.mk>

Modified: head/sysutils/solaar/distinfo
==============================================================================
--- head/sysutils/solaar/distinfo	Mon Aug  5 14:49:57 2019	(r508178)
+++ head/sysutils/solaar/distinfo	Mon Aug  5 15:05:59 2019	(r508179)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1550816390
-SHA256 (pwr-Solaar-0.9.2-259-gc07c115_GH0.tar.gz) = ba3cfc65cc249d80a571ee003d73d3f2376dfada8a2a9e7e2e74c05f952a4868
-SIZE (pwr-Solaar-0.9.2-259-gc07c115_GH0.tar.gz) = 1194838
+TIMESTAMP = 1565016777
+SHA256 (pwr-Solaar-Solaar-1.0.1_GH0.tar.gz) = 20f7c29610cc1d0a964052b6698c3e01f1703d08d621cbe7f9e45a9892632f13
+SIZE (pwr-Solaar-Solaar-1.0.1_GH0.tar.gz) = 1195660

Added: head/sysutils/solaar/files/devd-solaar.awk
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/solaar/files/devd-solaar.awk	Mon Aug  5 15:05:59 2019	(r508179)
@@ -0,0 +1,35 @@
+/^ATTRS/ {
+	split($0, attrs, /(==|")/)
+	vendor = attrs[3]
+	product = attrs[6]
+	if (devices[vendor] == "") {
+		devices[vendor] = sprintf("0x%s", product);
+	} else {
+		devices[vendor] = sprintf("%s|0x%s", devices[vendor], product);
+	}
+}
+
+END {
+	printf \
+"# Allows non-root users to have raw access to Logitech Unifying USB\n" \
+"# Receiver devices.\n\n"
+
+	for (vendor in devices) {
+		if (devices[vendor] ~ /\|/) {
+			products = sprintf("(%s)", devices[vendor])
+		} else {
+			products = devices[vendor]
+		}
+		printf \
+"notify 100 {\n" \
+"	match \"system\" \"USB\";\n" \
+"	match \"subsystem\" \"DEVICE\";\n" \
+"	match \"type\" \"ATTACH\";\n" \
+"	match \"vendor\" \"0x%s\";\n" \
+"	match \"product\" \"%s\";\n" \
+"# Please uncomment the line below and change the group name to suit\n" \
+"# your own needs.\n" \
+"#	action \"chgrp solaar /dev/$cdev && chmod 660 /dev/$cdev\";\n" \
+"};\n\n", vendor, products
+	}
+}

Modified: head/sysutils/solaar/pkg-descr
==============================================================================
--- head/sysutils/solaar/pkg-descr	Mon Aug  5 14:49:57 2019	(r508178)
+++ head/sysutils/solaar/pkg-descr	Mon Aug  5 15:05:59 2019	(r508179)
@@ -6,4 +6,4 @@ It comes in two flavors, command-line and GUI.  Both a
 the devices paired to a Unifying Receiver, show detailed info for each
 device, and also pair/unpair supported devices with the receiver.
 
-WWW: https://pwr.github.io/Solaar/
+WWW: https://pwr-solaar.github.io/Solaar/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908051505.x75F5xWw002059>