From owner-svn-ports-all@freebsd.org Mon Aug 5 15:06:00 2019 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E19FBC582B; Mon, 5 Aug 2019 15:06:00 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 462LgX5fc9z3HPQ; Mon, 5 Aug 2019 15:06:00 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A3D3B1D890; Mon, 5 Aug 2019 15:06:00 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x75F600D002067; Mon, 5 Aug 2019 15:06:00 GMT (envelope-from tobik@FreeBSD.org) Received: (from tobik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x75F5xWw002059; Mon, 5 Aug 2019 15:05:59 GMT (envelope-from tobik@FreeBSD.org) Message-Id: <201908051505.x75F5xWw002059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tobik set sender to tobik@FreeBSD.org using -f From: Tobias Kortkamp Date: Mon, 5 Aug 2019 15:05:59 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r508179 - in head/sysutils/solaar: . files X-SVN-Group: ports-head X-SVN-Commit-Author: tobik X-SVN-Commit-Paths: in head/sysutils/solaar: . files X-SVN-Commit-Revision: 508179 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2019 15:06:00 -0000 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 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/