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
This commit is contained in:
parent
39d3ee9e4c
commit
a3543facbc
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=508179
@ -1,13 +1,7 @@
|
|||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
PORTNAME= solaar
|
PORTNAME= solaar
|
||||||
# The latest release is from 2013 and there is not going to be a new
|
DISTVERSION= 1.0.1
|
||||||
# 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
|
|
||||||
CATEGORIES= sysutils
|
CATEGORIES= sysutils
|
||||||
|
|
||||||
MAINTAINER= tobik@FreeBSD.org
|
MAINTAINER= tobik@FreeBSD.org
|
||||||
@ -21,15 +15,16 @@ RUN_DEPENDS= ${LOCALBASE}/lib/libhidapi.so:comms/hidapi
|
|||||||
|
|
||||||
USES= python
|
USES= python
|
||||||
USE_GITHUB= yes
|
USE_GITHUB= yes
|
||||||
GH_ACCOUNT= pwr
|
GH_ACCOUNT= pwr-Solaar
|
||||||
GH_PROJECT= Solaar
|
GH_PROJECT= Solaar
|
||||||
USE_PYTHON= distutils autoplist concurrent optsuffix
|
USE_PYTHON= autoplist concurrent distutils optsuffix
|
||||||
|
|
||||||
NO_ARCH= yes
|
NO_ARCH= yes
|
||||||
|
|
||||||
OPTIONS_DEFINE= GUI
|
OPTIONS_DEFINE= GUI
|
||||||
|
|
||||||
GUI_USES= gnome
|
GUI_USES= gnome
|
||||||
GUI_USE= gnome=pygobject3:run
|
GUI_USE= GNOME=pygobject3:run
|
||||||
|
|
||||||
post-patch:
|
post-patch:
|
||||||
@${CP} ${FILESDIR}/hidapi.py ${WRKSRC}/lib/hidapi/udev.py
|
@${CP} ${FILESDIR}/hidapi.py ${WRKSRC}/lib/hidapi/udev.py
|
||||||
@ -41,8 +36,13 @@ post-patch:
|
|||||||
@${REINPLACE_CMD} 's|[[:<:]]cmd[[:>:]]|action|' \
|
@${REINPLACE_CMD} 's|[[:<:]]cmd[[:>:]]|action|' \
|
||||||
${WRKSRC}/lib/solaar/cli/__init__.py
|
${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:
|
post-install:
|
||||||
${INSTALL_DATA} ${FILESDIR}/devd-solaar.conf \
|
${INSTALL_DATA} ${WRKDIR}/solaar.conf.sample \
|
||||||
${STAGEDIR}${PREFIX}/etc/devd/solaar.conf.sample
|
${STAGEDIR}${PREFIX}/etc/devd
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
.include <bsd.port.mk>
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
TIMESTAMP = 1550816390
|
TIMESTAMP = 1565016777
|
||||||
SHA256 (pwr-Solaar-0.9.2-259-gc07c115_GH0.tar.gz) = ba3cfc65cc249d80a571ee003d73d3f2376dfada8a2a9e7e2e74c05f952a4868
|
SHA256 (pwr-Solaar-Solaar-1.0.1_GH0.tar.gz) = 20f7c29610cc1d0a964052b6698c3e01f1703d08d621cbe7f9e45a9892632f13
|
||||||
SIZE (pwr-Solaar-0.9.2-259-gc07c115_GH0.tar.gz) = 1194838
|
SIZE (pwr-Solaar-Solaar-1.0.1_GH0.tar.gz) = 1195660
|
||||||
|
35
sysutils/solaar/files/devd-solaar.awk
Normal file
35
sysutils/solaar/files/devd-solaar.awk
Normal file
@ -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
|
||||||
|
}
|
||||||
|
}
|
@ -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";
|
|
||||||
};
|
|
@ -6,4 +6,4 @@ 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
|
the devices paired to a Unifying Receiver, show detailed info for each
|
||||||
device, and also pair/unpair supported devices with the receiver.
|
device, and also pair/unpair supported devices with the receiver.
|
||||||
|
|
||||||
WWW: https://pwr.github.io/Solaar/
|
WWW: https://pwr-solaar.github.io/Solaar/
|
||||||
|
Loading…
Reference in New Issue
Block a user