aboutsummaryrefslogtreecommitdiff
path: root/sysutils/msiklm
diff options
context:
space:
mode:
authorJason E. Hale <jhale@FreeBSD.org>2018-03-14 16:07:03 +0000
committerJason E. Hale <jhale@FreeBSD.org>2018-03-14 16:07:03 +0000
commitced182019900391f8ea3d12e068b16b73a0968b7 (patch)
treeea9a2df68aeb40355eedfca4a1414a524532ee2d /sysutils/msiklm
parent9a5374aa9f6e06a1eedb2ef03e9132eb3efb5f98 (diff)
downloadports-ced182019900391f8ea3d12e068b16b73a0968b7.tar.gz
ports-ced182019900391f8ea3d12e068b16b73a0968b7.zip
Notes
Diffstat (limited to 'sysutils/msiklm')
-rw-r--r--sysutils/msiklm/Makefile42
-rw-r--r--sysutils/msiklm/distinfo3
-rw-r--r--sysutils/msiklm/files/Makefile.bsd11
-rw-r--r--sysutils/msiklm/files/msiklm.conf.sample.in33
-rw-r--r--sysutils/msiklm/files/pkg-message.in11
-rw-r--r--sysutils/msiklm/pkg-descr6
6 files changed, 106 insertions, 0 deletions
diff --git a/sysutils/msiklm/Makefile b/sysutils/msiklm/Makefile
new file mode 100644
index 000000000000..e3e52fd99448
--- /dev/null
+++ b/sysutils/msiklm/Makefile
@@ -0,0 +1,42 @@
+# $FreeBSD$
+
+PORTNAME= msiklm
+DISTVERSION= g20180227
+CATEGORIES= sysutils
+
+MAINTAINER= jhale@FreeBSD.org
+COMMENT= MSI keyboard light manager
+
+LICENSE= GPLv3+
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+ONLY_FOR_ARCHS= amd64 i386
+ONLY_FOR_ARCHS_REASON= This hardware is only found on x86 systems
+
+LIB_DEPENDS= libhidapi.so:comms/hidapi
+
+USES= dos2unix localbase:ldflags uidfix
+DOS2UNIX_FILES= README.md
+USE_GITHUB= yes
+GH_ACCOUNT= Gibtnix
+GH_PROJECT= MSIKLM
+GH_TAGNAME= 46dd076
+
+MAKEFILE= ${FILESDIR}/Makefile.bsd
+PLIST_FILES= bin/msiklm
+PORTDOCS= README.md
+
+OPTIONS_DEFINE= DEVD DOCS
+OPTIONS_DEFAULT= DEVD
+
+DEVD_PLIST_FILES= etc/devd/msiklm.conf.sample
+DEVD_SUB_FILES= msiklm.conf.sample pkg-message
+
+post-install-DEVD-on:
+ ${INSTALL_DATA} ${WRKDIR}/msiklm.conf.sample ${STAGEDIR}${PREFIX}/etc/devd
+
+post-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
diff --git a/sysutils/msiklm/distinfo b/sysutils/msiklm/distinfo
new file mode 100644
index 000000000000..5aa77019a0ea
--- /dev/null
+++ b/sysutils/msiklm/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1520932266
+SHA256 (Gibtnix-MSIKLM-g20180227-46dd076_GH0.tar.gz) = 371d889a9f0c2d81d8bf5a9bb48a50215d46e129c4424bacba570acb559e2d33
+SIZE (Gibtnix-MSIKLM-g20180227-46dd076_GH0.tar.gz) = 22164
diff --git a/sysutils/msiklm/files/Makefile.bsd b/sysutils/msiklm/files/Makefile.bsd
new file mode 100644
index 000000000000..036dceaaf625
--- /dev/null
+++ b/sysutils/msiklm/files/Makefile.bsd
@@ -0,0 +1,11 @@
+# $FreeBSD$
+
+BINDIR= ${PREFIX}/bin
+PROG= msiklm
+SRCS= src/main.c src/msiklm.c
+CFLAGS+= -Wall -W -D_REENTRANT
+LDADD= -lhidapi
+# Change to MK_MAN=no after 10.3 support is dropped
+NO_MAN= yes
+
+.include <bsd.prog.mk>
diff --git a/sysutils/msiklm/files/msiklm.conf.sample.in b/sysutils/msiklm/files/msiklm.conf.sample.in
new file mode 100644
index 000000000000..e48cc56835da
--- /dev/null
+++ b/sysutils/msiklm/files/msiklm.conf.sample.in
@@ -0,0 +1,33 @@
+# $FreeBSD$
+#
+# This entry runs the 'msiklm' utility upon device attach to set
+# a default keyboard backlight theme.
+
+# You may adjust ARGS to suit your preference.
+# Generally, the ARGS syntax is "<colors> <brightness> <mode>".
+# Some examples are listed below, but consult 'msiklm help' and
+# %%DOCSDIR%%/README.md
+# for more detailed information.
+
+# Confirm the ARGS work as expected by running (as superuser):
+# msiklm <ARGS>
+# before placing in the options substatement below.
+
+# Examples:
+# set ARGS "red,white,blue high wave";
+# set ARGS "green,blue,red medium breathe";
+# set ARGS "orange low";
+# set ARGS "off";
+
+options {
+ set ARGS "red,blue,green high normal";
+};
+
+notify 100 {
+ match "system" "USB";
+ match "subsystem" "DEVICE";
+ match "type" "ATTACH";
+ match "vendor" "0x1770";
+ match "product" "0xff00";
+ action "%%PREFIX%%/bin/msiklm $ARGS";
+};
diff --git a/sysutils/msiklm/files/pkg-message.in b/sysutils/msiklm/files/pkg-message.in
new file mode 100644
index 000000000000..3af659c5c1b4
--- /dev/null
+++ b/sysutils/msiklm/files/pkg-message.in
@@ -0,0 +1,11 @@
+-----------------------------------------------------------------------
+
+ A sample devd(8) configuration file has been installed as:
+ %%PREFIX%%/etc/devd/msiklm.conf.sample
+
+ You may want to copy this file to:
+ %%PREFIX%%/etc/devd/msiklm.conf
+ and configure it to your liking if you want msiklm to automatically
+ set your keyboard backlight to a default upon system boot/resume.
+
+-----------------------------------------------------------------------
diff --git a/sysutils/msiklm/pkg-descr b/sysutils/msiklm/pkg-descr
new file mode 100644
index 000000000000..a24cd04316c4
--- /dev/null
+++ b/sysutils/msiklm/pkg-descr
@@ -0,0 +1,6 @@
+MSI Keyboard Light Manager (MSIKLM) is an easy-to-use command-line
+tool that allows users to configure the backlight of SteelSeries
+keyboards found in MSI gaming notebooks. It offers similar
+functionality to the SteelSeries Engine for Windows.
+
+WWW: https://github.com/Gibtnix/MSIKLM