Github messages for voidlinux
 help / color / mirror / Atom feed
From: Vaelatern <Vaelatern@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [RFC] Labjack
Date: Tue, 06 Jul 2021 08:05:32 +0200	[thread overview]
Message-ID: <20210706060532.V3ZEyfO--CXHjL0GayWpMkQgmIttLEGlKCioM6tiLBU@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-31731@inbox.vuxu.org>

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

There is an updated 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: 4139 bytes --]

From 3f7567a63337893b2c9d1f549da986f29f57aa88 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..3e4256203c78
--- /dev/null
+++ b/srcpkgs/exodriver/template
@@ -0,0 +1,26 @@
+# Template file for 'exodriver'
+pkgname=exodriver
+version=2.6.0
+revision=1
+build_wrksrc=liblabjackusb
+build_style=gnu-makefile
+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 8b9819878ae6de2c79d3af22fd739677c064c12d 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 | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 srcpkgs/LabJackPython/template

diff --git a/srcpkgs/LabJackPython/template b/srcpkgs/LabJackPython/template
new file mode 100644
index 000000000000..7ab2405a01b8
--- /dev/null
+++ b/srcpkgs/LabJackPython/template
@@ -0,0 +1,21 @@
+# Template file for 'LabJackPython'
+pkgname=LabJackPython
+version=2.0.4
+revision=1
+build_style=python3-module
+hostmakedepends="python3"
+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/${version}.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.

  parent reply	other threads:[~2021-07-06  6:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-01  5:54 [PR PATCH] " 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 ` Vaelatern [this message]
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=20210706060532.V3ZEyfO--CXHjL0GayWpMkQgmIttLEGlKCioM6tiLBU@z \
    --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).