Github messages for voidlinux
 help / color / mirror / Atom feed
From: Vaelatern <Vaelatern@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] [RFC] Labjack
Date: Thu, 01 Jul 2021 07:54:17 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-31731@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 692 bytes --]

There is a new pull request by Vaelatern against master on the void-packages repository

https://github.com/Vaelatern/void-packages labjack
https://github.com/void-linux/void-packages/pull/31731

[RFC] Labjack
Running this for CI.

Could use a sanity check. Not sure if LabJackPython should be a package. I don't see the harm in it, but it's not compiled, has no compiled aspects, basically is here because it helps me  test (and also use) the exodriver library.

Also not sure if labjackusb.so (from exodriver) should be in common/shlibs, since no existing programs I know about want to link it.

A patch file from https://github.com/void-linux/void-packages/pull/31731.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-labjack-31731.patch --]
[-- Type: text/x-diff, Size: 4105 bytes --]

From 9c66880beb0800ba66fc46cfca7d674160d6c24d Mon Sep 17 00:00:00 2001
From: Toyam Cox <Vaelatern@voidlinux.org>
Date: Thu, 1 Jul 2021 01:13:53 -0400
Subject: [PATCH 1/2] New package: exodriver-2.6.0

---
 srcpkgs/exodriver/patches/destdir.patch       | 13 ++++++++++
 .../exodriver/patches/link-so-correctly.patch | 11 ++++++++
 srcpkgs/exodriver/template                    | 26 +++++++++++++++++++
 3 files changed, 50 insertions(+)
 create mode 100644 srcpkgs/exodriver/patches/destdir.patch
 create mode 100644 srcpkgs/exodriver/patches/link-so-correctly.patch
 create mode 100644 srcpkgs/exodriver/template

diff --git a/srcpkgs/exodriver/patches/destdir.patch b/srcpkgs/exodriver/patches/destdir.patch
new file mode 100644
index 000000000000..fab8d6c314f8
--- /dev/null
+++ b/srcpkgs/exodriver/patches/destdir.patch
@@ -0,0 +1,13 @@
+--- ./liblabjackusb/Makefile.orig	2021-06-29 19:26:03.060647459 -0400
++++ ./liblabjackusb/Makefile	2021-06-29 19:25:31.946314812 -0400
+@@ -7,9 +7,9 @@
+ 
+ VERSION = 2.6.0
+ PREFIX ?= /usr/local
+-DESTINATION = $(PREFIX)/lib
++DESTINATION = $(DESTDIR)$(PREFIX)/lib
+ HEADER = labjackusb.h
+-HEADER_DESTINATION = $(PREFIX)/include
++HEADER_DESTINATION = $(DESTDIR)$(PREFIX)/include
+ LIBFLAGS = -lusb-1.0 -lc
+ ADD_LDCONFIG_PATH = ./add_ldconfig_path.sh
diff --git a/srcpkgs/exodriver/patches/link-so-correctly.patch b/srcpkgs/exodriver/patches/link-so-correctly.patch
new file mode 100644
index 000000000000..5f230619033e
--- /dev/null
+++ b/srcpkgs/exodriver/patches/link-so-correctly.patch
@@ -0,0 +1,11 @@
+--- ./liblabjackusb/Makefile.orig	2021-07-01 00:54:29.910491840 -0400
++++ ./liblabjackusb/Makefile	2021-07-01 00:45:41.675599194 -0400
+@@ -71,7 +71,7 @@
+ 	ldconfig
+ endif
+ ifeq ($(LINK_SO),1)
+-	ln -i -s $(DESTINATION)/$(TARGET) $(DESTINATION)/liblabjackusb.$(ext)
++	ln -i -s $(TARGET) $(DESTINATION)/liblabjackusb.$(ext)
+ endif
+ 
+ clean:
diff --git a/srcpkgs/exodriver/template b/srcpkgs/exodriver/template
new file mode 100644
index 000000000000..f3b449c55934
--- /dev/null
+++ b/srcpkgs/exodriver/template
@@ -0,0 +1,26 @@
+# Template file for 'exodriver'
+pkgname=exodriver
+version=2.6.0
+revision=1
+build_style=gnu-makefile
+build_wrksrc=liblabjackusb
+make_use_env=yes
+makedepends="libusb-devel"
+short_desc="LabJack U3, U6, and UE9 low-level driver"
+maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
+license="MIT X11"
+homepage="https://labjack.com/support/software/installers/exodriver"
+distfiles="https://github.com/labjack/exodriver/archive/refs/tags/v${version}.tar.gz"
+checksum=d2ccf992bf42b50e7c009ae3d9d3d3191a67bfc8a2027bd54ba4cbd4a80114b2
+
+pre_install() {
+	export LINK_SO=1
+}
+
+post_install() {
+	vmkdir usr/lib/udev/rules.d
+	vmkdir usr/share/examples/${pkgname}
+	vcopy ../90-labjack.rules usr/lib/udev/rules.d/
+	vlicense ../README
+	cp -r ../examples/* ${DESTDIR}/usr/share/examples/${pkgname}
+}

From 4f5feb68d79dd7b95cea4925485569cabaf0b35a Mon Sep 17 00:00:00 2001
From: Toyam Cox <Vaelatern@voidlinux.org>
Date: Thu, 1 Jul 2021 01:13:58 -0400
Subject: [PATCH 2/2] New package: LabJackPython-2.0.4

---
 srcpkgs/LabJackPython/template | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 srcpkgs/LabJackPython/template

diff --git a/srcpkgs/LabJackPython/template b/srcpkgs/LabJackPython/template
new file mode 100644
index 000000000000..dd692790511d
--- /dev/null
+++ b/srcpkgs/LabJackPython/template
@@ -0,0 +1,20 @@
+# Template file for 'LabJackPython'
+pkgname=LabJackPython
+version=2.0.4
+revision=1
+build_style=python3-module
+depends="exodriver"
+short_desc="Python modules and examples for the LabJack U3, U6, UE9 and U12"
+maintainer="Toyam Cox <Vaelatern@voidlinux.org>"
+license="MIT"
+homepage="https://labjack.com/support/software/examples/ud/labjackpython"
+distfiles="https://github.com/labjack/LabJackPython/archive/refs/tags/2.0.4.tar.gz"
+checksum=61911991529ab5f40f17e42823b417dadbf1fe47978e4dc045bdd7da7563e7c2
+
+post_install() {
+	vlicense LICENSE
+}
+
+# REMARKS:
+# To check this, you have to try to import a library. Most of the checks are
+# done then.

             reply	other threads:[~2021-07-01  5:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-01  5:54 Vaelatern [this message]
2021-07-01  5:56 ` [PR PATCH] [Updated] " Vaelatern
2021-07-01  5:56 ` Vaelatern
2021-07-01  6:01 ` Vaelatern
2021-07-01 11:53 ` ahesford
2021-07-06  6:05 ` [PR PATCH] [Updated] " Vaelatern
2021-07-06  6:05 ` [PR PATCH] [Merged]: " Vaelatern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-31731@inbox.vuxu.org \
    --to=vaelatern@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).