From d9f21ec4e0cfef32655cb0f651b9a4fa6be46e8d Mon Sep 17 00:00:00 2001 From: Adam Gausmann Date: Tue, 28 Nov 2023 16:18:54 -0600 Subject: [PATCH 1/2] New package: fxload-2008.10.13 --- srcpkgs/fxload/template | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 srcpkgs/fxload/template diff --git a/srcpkgs/fxload/template b/srcpkgs/fxload/template new file mode 100644 index 0000000000000..109e073302e04 --- /dev/null +++ b/srcpkgs/fxload/template @@ -0,0 +1,15 @@ +# Template file for 'fxload' +pkgname=fxload +version=2008.10.13 +revision=1 +build_style=gnu-makefile +short_desc="Download firmware into EZ-USB FX devices" +maintainer="Adam Gausmann " +license="GPL-2.0-or-later" +homepage="https://sourceforge.net/projects/linux-hotplug" +distfiles="https://sourceforge.net/projects/linux-hotplug/files/fxload/${version//./_}/fxload-${version//./_}.tar.gz" +checksum=0cc8bfd2a7cbba2f68e0c5767477634922287943c91dd9fcf029fc8b9d577858 + +do_install() { + make ${makejobs} prefix=${DESTDIR} sbindir=${DESTDIR}/usr/bin install +} From 44510b5c11b4c982ba3672c4495c130a4d5c0cc9 Mon Sep 17 00:00:00 2001 From: Adam Gausmann Date: Tue, 28 Nov 2023 16:18:54 -0600 Subject: [PATCH 2/2] New package: linux-gpib-4.3.6 --- srcpkgs/linux-gpib/INSTALL.msg | 10 ++++ srcpkgs/linux-gpib/files/dkms.conf | 58 +++++++++++++++++++ .../patches/dkms-kernel-version.diff | 10 ++++ srcpkgs/linux-gpib/template | 42 ++++++++++++++ 4 files changed, 120 insertions(+) create mode 100644 srcpkgs/linux-gpib/INSTALL.msg create mode 100644 srcpkgs/linux-gpib/files/dkms.conf create mode 100644 srcpkgs/linux-gpib/patches/dkms-kernel-version.diff create mode 100644 srcpkgs/linux-gpib/template diff --git a/srcpkgs/linux-gpib/INSTALL.msg b/srcpkgs/linux-gpib/INSTALL.msg new file mode 100644 index 0000000000000..4cbb34755efc7 --- /dev/null +++ b/srcpkgs/linux-gpib/INSTALL.msg @@ -0,0 +1,10 @@ +If your GPIB device requires external firmware, you will need to install +firmware files for your device. + +Some firmwares are available from https://github.com/fmhess/linux_gpib_firmware +Put the contents of that repository in /usr/share/usb. If you are using the NI +GPIB-USB-B, you may have to copy the "ni_gpib_usb_b" directory to "ni_usb_gpib" + +Make sure you have the "fxload" and "udev" packages installed on your computer. +Then, the udev scripts installed by this package will automatically upload the +firmware to your device and load the driver module when the device is detected. diff --git a/srcpkgs/linux-gpib/files/dkms.conf b/srcpkgs/linux-gpib/files/dkms.conf new file mode 100644 index 0000000000000..74a26e3327a0c --- /dev/null +++ b/srcpkgs/linux-gpib/files/dkms.conf @@ -0,0 +1,58 @@ +PACKAGE_NAME="linux-gpib" +PACKAGE_VERSION="4.3.6" +AUTOINSTALL=yes + +MAKE="make LINUX_VERSION=$kernelver" +CLEAN="make clean" + +BUILT_MODULE_NAME[0]="gpib_common" +BUILT_MODULE_LOCATION[0]="drivers/gpib/sys/" +DEST_MODULE_LOCATION[0]="/kernel/drivers/gpib" + +BUILT_MODULE_NAME[1]="agilent_82357a" +BUILT_MODULE_LOCATION[1]="drivers/gpib/agilent_82357a/" +DEST_MODULE_LOCATION[1]="/kernel/drivers/gpib" + +BUILT_MODULE_NAME[2]="cb7210" +BUILT_MODULE_LOCATION[2]="drivers/gpib/cb7210/" +DEST_MODULE_LOCATION[2]="/kernel/drivers/gpib" + +BUILT_MODULE_NAME[3]="agilent_82350b" +BUILT_MODULE_LOCATION[3]="drivers/gpib/agilent_82350b/" +DEST_MODULE_LOCATION[3]="/kernel/drivers/gpib" + +BUILT_MODULE_NAME[4]="ni_usb_gpib" +BUILT_MODULE_LOCATION[4]="drivers/gpib/ni_usb/" +DEST_MODULE_LOCATION[4]="/kernel/drivers/gpib" + +BUILT_MODULE_NAME[5]="hp_82341" +BUILT_MODULE_LOCATION[5]="drivers/gpib/hp_82341/" +DEST_MODULE_LOCATION[5]="/kernel/drivers/gpib" + +BUILT_MODULE_NAME[6]="tnt4882" +BUILT_MODULE_LOCATION[6]="drivers/gpib/tnt4882/" +DEST_MODULE_LOCATION[6]="/kernel/drivers/gpib" + +BUILT_MODULE_NAME[7]="cec_gpib" +BUILT_MODULE_LOCATION[7]="drivers/gpib/cec/" +DEST_MODULE_LOCATION[7]="/kernel/drivers/gpib" + +BUILT_MODULE_NAME[8]="ines_gpib" +BUILT_MODULE_LOCATION[8]="drivers/gpib/ines/" +DEST_MODULE_LOCATION[8]="/kernel/drivers/gpib" + +BUILT_MODULE_NAME[9]="lpvo_usb_gpib" +BUILT_MODULE_LOCATION[9]="drivers/gpib/lpvo_usb_gpib/" +DEST_MODULE_LOCATION[9]="/kernel/drivers/gpib" + +BUILT_MODULE_NAME[10]="tms9914" +BUILT_MODULE_LOCATION[10]="drivers/gpib/tms9914/" +DEST_MODULE_LOCATION[10]="/kernel/drivers/gpib" + +BUILT_MODULE_NAME[11]="nec7210" +BUILT_MODULE_LOCATION[11]="drivers/gpib/nec7210/" +DEST_MODULE_LOCATION[11]="/kernel/drivers/gpib" + +BUILT_MODULE_NAME[12]="hp82335" +BUILT_MODULE_LOCATION[12]="drivers/gpib/hp_82335/" +DEST_MODULE_LOCATION[12]="/kernel/drivers/gpib" diff --git a/srcpkgs/linux-gpib/patches/dkms-kernel-version.diff b/srcpkgs/linux-gpib/patches/dkms-kernel-version.diff new file mode 100644 index 0000000000000..bceee24e12ba8 --- /dev/null +++ b/srcpkgs/linux-gpib/patches/dkms-kernel-version.diff @@ -0,0 +1,10 @@ +--- a/linux-gpib-kernel-4.3.6/Makefile ++++ b/linux-gpib-kernel-4.3.6/Makefile +@@ -1,7 +1,7 @@ + # Makefile + + GPIB_SRCDIR ?= $(CURDIR) +-LINUX_SRCDIR ?= /lib/modules/`uname -r`/build ++LINUX_SRCDIR ?= /lib/modules/$(LINUX_VERSION)/build + VERBOSE ?= 0 + GPIB_DEBUG ?= 0 diff --git a/srcpkgs/linux-gpib/template b/srcpkgs/linux-gpib/template new file mode 100644 index 0000000000000..5fdf43cb8156a --- /dev/null +++ b/srcpkgs/linux-gpib/template @@ -0,0 +1,42 @@ +# Template file for 'linux-gpib' +pkgname=linux-gpib +version=4.3.6 +revision=1 +hostmakedepends="rsync" +depends="dkms" +short_desc="GPIB kernel modules and userspace utilities" +maintainer="Adam Gausmann " +license="GPL-3.0-or-later" +homepage="https://sourceforge.net/projects/linux-gpib" +changelog="https://sourceforge.net/p/linux-gpib/code/HEAD/tree/trunk/ChangeLog?format=raw" +distfiles="https://sourceforge.net/projects/linux-gpib/files/linux-gpib%20for%203.x.x%20and%202.6.x%20kernels/${version}/linux-gpib-${version}.tar.gz" +checksum=1b37b8c6bbe4844827f89e4986bc9c7b38e9dae8650f5bfa697d161afe09d898 +dkms_modules="${pkgname} ${version}" + +post_extract() { + bsdtar -xf "linux-gpib-kernel-${version}.tar.gz" + bsdtar -xf "linux-gpib-user-${version}.tar.gz" +} + +do_build() { + cd "linux-gpib-user-${version}" + ./configure --host=${XBPS_CROSS_TRIPLET} --prefix=/usr \ + --sbindir=/usr/bin --sysconfdir=/etc + make ${makejobs} +} + +do_install() { + vmkdir usr/src + rsync -a "linux-gpib-kernel-${version}/" "${DESTDIR}/usr/src/${pkgname}-${version}" + vinstall "${FILESDIR}/dkms.conf" 644 "usr/src/${pkgname}-${version}" + + cd "linux-gpib-user-${version}" + make "DESTDIR=${DESTDIR}" UDEV_RULES_DIR=/usr/lib/udev/rules.d install + vdoc AUTHORS + vdoc COPYING + vdoc ChangeLog + vdoc README + vdoc README.HAMEG + vdoc README.hp82335 + vdoc TODO +}