Index: head/sysutils/solaar/Makefile =================================================================== --- head/sysutils/solaar/Makefile (revision 508178) +++ head/sysutils/solaar/Makefile (revision 508179) @@ -1,48 +1,48 @@ # $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 COMMENT= Device manager for the Logitech Unifying Receiver LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING # libhidapi.so is only loaded at runtime via ctypes (dlopen) RUN_DEPENDS= ${LOCALBASE}/lib/libhidapi.so:comms/hidapi 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 @${REINPLACE_CMD} -e '/pyudev/d' \ -e 's|python-gi|${PYTHON_PKGNAMEPREFIX}gobject3|' \ ${WRKSRC}/lib/solaar/gtk.py @${REINPLACE_CMD} 's|receiver\.path\.split.*|receiver.path)|' \ ${WRKSRC}/lib/logitech_receiver/listener.py @${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 Index: head/sysutils/solaar/distinfo =================================================================== --- head/sysutils/solaar/distinfo (revision 508178) +++ head/sysutils/solaar/distinfo (revision 508179) @@ -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 Index: head/sysutils/solaar/files/devd-solaar.conf =================================================================== --- head/sysutils/solaar/files/devd-solaar.conf (revision 508178) +++ head/sysutils/solaar/files/devd-solaar.conf (nonexistent) @@ -1,13 +0,0 @@ -# Allows non-root users to have raw access to Logitech Unifying USB -# Receiver devices. - -notify 100 { - match "system" "USB"; - match "subsystem" "DEVICE"; - match "type" "ATTACH"; - match "vendor" "0x046d"; - match "product" "(0xc52b|0xc532|0xc52f|0xc526|0xc52e|0xc51b|0xc531|0xc517|0xc518|0xc51a|0xc521|0xc525|0xc534)"; -# Please uncomment the line below and change the group name to suit -# your own needs. -# action "chgrp solaar /dev/$cdev && chmod 660 /dev/$cdev"; -}; Property changes on: head/sysutils/solaar/files/devd-solaar.conf ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/solaar/files/devd-solaar.awk =================================================================== --- head/sysutils/solaar/files/devd-solaar.awk (nonexistent) +++ head/sysutils/solaar/files/devd-solaar.awk (revision 508179) @@ -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 + } +} Property changes on: head/sysutils/solaar/files/devd-solaar.awk ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/solaar/pkg-descr =================================================================== --- head/sysutils/solaar/pkg-descr (revision 508178) +++ head/sysutils/solaar/pkg-descr (revision 508179) @@ -1,9 +1,9 @@ Solaar is a device manager for Logitech's Unifying Receiver. It is able to pair/unpair devices to the receiver, and for most devices read battery status. It comes in two flavors, command-line and GUI. Both are able to list 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/