Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] [RFC] Labjack
@ 2021-07-01  5:54 Vaelatern
  2021-07-01  5:56 ` [PR PATCH] [Updated] " Vaelatern
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Vaelatern @ 2021-07-01  5:54 UTC (permalink / raw)
  To: ml

[-- 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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-07-06  6:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-01  5:54 [PR PATCH] [RFC] Labjack Vaelatern
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

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).