aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Vereeken <Alexander88207@protonmail.com>2021-12-04 10:10:49 +0000
committerLewis Cook <lcook@FreeBSD.org>2021-12-04 10:16:38 +0000
commitfc16547fa75f66b4293dd84ee5cda1f03d927f18 (patch)
tree3010d551591f9f8c101f889723e00a4e1be5beab
parentff4d093f3184e3b8fd89a37196408e4182ee99ac (diff)
downloadports-fc16547fa75f66b4293dd84ee5cda1f03d927f18.tar.gz
ports-fc16547fa75f66b4293dd84ee5cda1f03d927f18.zip
misc/g810-led: Add port: Led controller for Logitech G- Keyboards
PR: 254967 Reviewed by: lwshu, diizzy, mat, koobs Differential Revision: https://reviews.freebsd.org/D29699
-rw-r--r--misc/Makefile1
-rw-r--r--misc/g810-led/Makefile25
-rw-r--r--misc/g810-led/distinfo3
-rw-r--r--misc/g810-led/files/patch-makefile68
-rw-r--r--misc/g810-led/pkg-descr3
-rw-r--r--misc/g810-led/pkg-plist24
6 files changed, 124 insertions, 0 deletions
diff --git a/misc/Makefile b/misc/Makefile
index 75406a3b6b1a..ce3d56f2bfae 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -133,6 +133,7 @@
SUBDIR += frugally-deep
SUBDIR += ftdi-eeprom
SUBDIR += fxload
+ SUBDIR += g810-led
SUBDIR += gedkeeper
SUBDIR += geekcode
SUBDIR += getopt
diff --git a/misc/g810-led/Makefile b/misc/g810-led/Makefile
new file mode 100644
index 000000000000..3262c02d82a4
--- /dev/null
+++ b/misc/g810-led/Makefile
@@ -0,0 +1,25 @@
+# Created by: Alexander Vereeken <Alexander88207@protonmail.com>
+
+PORTNAME= g810-led
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.4.2
+CATEGORIES= misc
+
+MAINTAINER= Alexander88207@protonmail.com
+COMMENT= LED controller for Logitech G-series keyboards
+
+LICENSE= GPLv3
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= hidapi>0:comms/hidapi
+LIB_DEPENDS= libhidapi.so:comms/hidapi
+
+USES= gmake
+USE_GCC= yes
+
+USE_GITHUB= yes
+GH_ACCOUNT= MatMoul
+
+MAKEFILE= makefile
+
+.include <bsd.port.mk>
diff --git a/misc/g810-led/distinfo b/misc/g810-led/distinfo
new file mode 100644
index 000000000000..3d0af1ac1ec3
--- /dev/null
+++ b/misc/g810-led/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1621812688
+SHA256 (MatMoul-g810-led-v0.4.2_GH0.tar.gz) = feeec1c214c80d0fc75a16dcf5a1d20e49cc2ee407d97fd52d0caa4a0a395e9c
+SIZE (MatMoul-g810-led-v0.4.2_GH0.tar.gz) = 36669
diff --git a/misc/g810-led/files/patch-makefile b/misc/g810-led/files/patch-makefile
new file mode 100644
index 000000000000..8d1663488aa1
--- /dev/null
+++ b/misc/g810-led/files/patch-makefile
@@ -0,0 +1,68 @@
+--- makefile.orig 2020-05-19 21:44:50 UTC
++++ makefile
+@@ -6,7 +6,7 @@ ifeq ($(LIB),libusb)
+ LIBS=-lusb-1.0
+ else
+ CPPFLAGS=-Dhidapi
+- LIBS=-lhidapi-hidraw
++ LIBS=-lhidapi
+ endif
+ SYSTEMDDIR?=/usr/lib/systemd
+
+@@ -54,25 +54,20 @@ clean:
+
+ setup:
+ @install -m 755 -d \
+- $(DESTDIR)/usr/bin \
+- $(DESTDIR)/etc/$(PROGN)/samples \
+- $(DESTDIR)/etc/udev/rules.d
+- @cp bin/$(PROGN) $(DESTDIR)/usr/bin
+- @test -s $(DESTDIR)/usr/bin/g213-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/g213-led
+- @test -s $(DESTDIR)/usr/bin/g410-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/g410-led
+- @test -s $(DESTDIR)/usr/bin/g413-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/g413-led
+- @test -s $(DESTDIR)/usr/bin/g512-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/g512-led
+- @test -s $(DESTDIR)/usr/bin/g513-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/g513-led
+- @test -s $(DESTDIR)/usr/bin/g610-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/g610-led
+- @test -s $(DESTDIR)/usr/bin/g815-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/g815-led
+- @test -s $(DESTDIR)/usr/bin/g910-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/g910-led
+- @test -s $(DESTDIR)/usr/bin/gpro-led || ln -s /usr/bin/$(PROGN) $(DESTDIR)/usr/bin/gpro-led
+- @cp sample_profiles/* $(DESTDIR)/etc/$(PROGN)/samples
+- @cp udev/$(PROGN).rules $(DESTDIR)/etc/udev/rules.d
+- @test -s /usr/bin/systemd-run && \
+- install -m 755 -d $(DESTDIR)$(SYSTEMDDIR)/system && \
+- cp systemd/$(PROGN)-reboot.service $(DESTDIR)$(SYSTEMDDIR)/system
+-
++ $(DESTDIR)/usr/local/bin \
++ $(DESTDIR)/usr/local/etc/$(PROGN)/samples
++ @cp bin/$(PROGN) $(DESTDIR)/usr/local/bin
++ @test -s $(DESTDIR)/usr/local/bin/g213-led || ln -s /usr/local/bin/$(PROGN) $(DESTDIR)/usr/local/bin/g213-led
++ @test -s $(DESTDIR)/usr/local/bin/g410-led || ln -s /usr/local/bin/$(PROGN) $(DESTDIR)/usr/local/bin/g410-led
++ @test -s $(DESTDIR)/usr/local/bin/g413-led || ln -s /usr/local/bin/$(PROGN) $(DESTDIR)/usr/local/bin/g413-led
++ @test -s $(DESTDIR)/usr/local/bin/g512-led || ln -s /usr/local/bin/$(PROGN) $(DESTDIR)/usr/local/bin/g512-led
++ @test -s $(DESTDIR)/usr/local/bin/g513-led || ln -s /usr/local/bin/$(PROGN) $(DESTDIR)/usr/local/bin/g513-led
++ @test -s $(DESTDIR)/usr/local/bin/g610-led || ln -s /usr/local/bin/$(PROGN) $(DESTDIR)/usr/local/bin/g610-led
++ @test -s $(DESTDIR)/usr/local/bin/g815-led || ln -s /usr/local/bin/$(PROGN) $(DESTDIR)/usr/local/bin/g815-led
++ @test -s $(DESTDIR)/usr/local/bin/g910-led || ln -s /usr/local/bin/$(PROGN) $(DESTDIR)/usr/local/bin/g910-led
++ @test -s $(DESTDIR)/usr/local/bin/gpro-led || ln -s /usr/local/bin/$(PROGN) $(DESTDIR)/usr/local/bin/gpro-led
++ @cp sample_profiles/* $(DESTDIR)/usr/local/etc/$(PROGN)/samples
++
+ install-lib: lib
+ @install -m 755 -d $(libdir)
+ @install -m 644 lib/lib$(PROGN).so.$(MAJOR).$(MINOR).$(MICRO) $(libdir)/
+@@ -83,15 +78,7 @@ install-dev: install-lib
+ @install -m 644 src/classes/*.h $(includedir)/$(PROGN)
+
+ install: setup
+- @test -s /etc/$(PROGN)/profile || \
+- cp /etc/$(PROGN)/samples/group_keys /etc/$(PROGN)/profile
+- @test -s /etc/$(PROGN)/reboot || \
+- cp /etc/$(PROGN)/samples/all_off /etc/$(PROGN)/reboot
+- @udevadm control --reload-rules
+- @$(PROGN) -p /etc/$(PROGN)/profile
+- @test -s /usr/bin/systemd-run && \
+- systemctl daemon-reload && \
+- systemctl enable $(PROGN)-reboot
++# Nothing to do
+
+ uninstall-lib:
+ @rm -f $(libdir)/lib$(PROGN).so*
diff --git a/misc/g810-led/pkg-descr b/misc/g810-led/pkg-descr
new file mode 100644
index 000000000000..2e06206685e5
--- /dev/null
+++ b/misc/g810-led/pkg-descr
@@ -0,0 +1,3 @@
+LED controller for Logitech G-series keyboards
+
+WWW: https://github.com/MatMoul/g810-led
diff --git a/misc/g810-led/pkg-plist b/misc/g810-led/pkg-plist
new file mode 100644
index 000000000000..41e7a7aafb65
--- /dev/null
+++ b/misc/g810-led/pkg-plist
@@ -0,0 +1,24 @@
+bin/g213-led
+bin/g410-led
+bin/g413-led
+bin/g512-led
+bin/g513-led
+bin/g610-led
+bin/g810-led
+bin/g815-led
+bin/g910-led
+bin/gpro-led
+%%ETCDIR%%/samples/all_blue
+%%ETCDIR%%/samples/all_blue_fxl_breathing_red
+%%ETCDIR%%/samples/all_green
+%%ETCDIR%%/samples/all_off
+%%ETCDIR%%/samples/all_red
+%%ETCDIR%%/samples/colors
+%%ETCDIR%%/samples/fx_breathing_red
+%%ETCDIR%%/samples/fx_color_green
+%%ETCDIR%%/samples/fx_cwave
+%%ETCDIR%%/samples/fx_cycle
+%%ETCDIR%%/samples/fx_hwave
+%%ETCDIR%%/samples/fx_vwave
+%%ETCDIR%%/samples/group_keys
+%%ETCDIR%%/samples/keys_v_gradiant_fr_ch-latin1