summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Viilup2016-02-02 20:00:47 +0200
committerSven Viilup2016-02-02 20:00:47 +0200
commita9c6d8a67b6ba46a8543312d312306c2eeafee85 (patch)
tree2492fd863e8bc4c65b3255536bce74e9c7550522
downloadaur-a9c6d8a67b6ba46a8543312d312306c2eeafee85.tar.gz
Initial commit
-rw-r--r--.SRCINFO24
-rw-r--r--42-madfuload.rules16
-rw-r--r--PKGBUILD34
-rw-r--r--fix-64-bit-implicit-declarations.patch14
-rw-r--r--madfuload.install12
-rw-r--r--use-udevadm-in-configure.patch11
6 files changed, 111 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..fafd55cb6521
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+# Generated by mksrcinfo v8
+# Tue Feb 2 17:58:48 UTC 2016
+pkgbase = madfuload
+ pkgdesc = USB and MIDI firmware loaders for M-Audio (or Midiman) hardware
+ pkgver = 1.2
+ pkgrel = 6
+ url = http://sourceforge.net/projects/usb-midi-fw
+ install = madfuload.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = glibc
+ provides = madfuload
+ source = http://downloads.sourceforge.net/usb-midi-fw/madfuload-1.2.tar.gz
+ source = use-udevadm-in-configure.patch
+ source = fix-64-bit-implicit-declarations.patch
+ source = 42-madfuload.rules
+ md5sums = 6a2c68021e2e05c4eb35e67158b9414e
+ md5sums = 7e77d22ecc489eb849d2b6fadc97e1ca
+ md5sums = 49075ca2b54d75639fdca3be34f1815c
+ md5sums = b7b883dc6d35676f93d598daebaa5c90
+
+pkgname = madfuload
+
diff --git a/42-madfuload.rules b/42-madfuload.rules
new file mode 100644
index 000000000000..468a6faae946
--- /dev/null
+++ b/42-madfuload.rules
@@ -0,0 +1,16 @@
+# madfuload.rules - udev rules for loading firmware into M-Audio DFU devices
+
+# Audiophile
+ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0763", ATTR{idProduct}=="2803", RUN+="/usr/bin/madfuload -l -n -f /usr/share/usb/maudio/ma003101.bin -D $env{DEVNAME}"
+
+# MobilePre
+ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0763", ATTR{idProduct}=="2804", RUN+="/usr/bin/madfuload -l -3 -f /usr/share/usb/maudio/ma004103.bin -D $env{DEVNAME}"
+
+# Sonica
+ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0763", ATTR{idProduct}=="2805", RUN+="/usr/bin/madfuload -l -n -f /usr/share/usb/maudio/ma005101.bin -D $env{DEVNAME}"
+
+# Transit
+ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0763", ATTR{idProduct}=="2806", RUN+="/usr/bin/madfuload -l -3 -f /usr/share/usb/maudio/ma006100.bin -D $env{DEVNAME}"
+
+# Ozone
+ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0763", ATTR{idProduct}=="2808", RUN+="/usr/bin/madfuload -l -3 -f /usr/share/usb/maudio/ma008100.bin -D $env{DEVNAME}"
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5dfb4499689c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Sven Viilup <s dot viilup at gmail dot com>
+# Contributor: Maxwell Pray a.k.a. Synthead <synthead at gmail dot com>
+pkgname=madfuload
+pkgver=1.2
+pkgrel=6
+provides=(madfuload)
+depends=(glibc)
+pkgdesc="USB and MIDI firmware loaders for M-Audio (or Midiman) hardware"
+arch=('i686' 'x86_64')
+url="http://sourceforge.net/projects/usb-midi-fw"
+license=('GPL')
+source=("http://downloads.sourceforge.net/usb-midi-fw/$pkgname-$pkgver.tar.gz"
+ 'use-udevadm-in-configure.patch'
+ 'fix-64-bit-implicit-declarations.patch'
+ '42-madfuload.rules')
+md5sums=('6a2c68021e2e05c4eb35e67158b9414e'
+ '7e77d22ecc489eb849d2b6fadc97e1ca'
+ '49075ca2b54d75639fdca3be34f1815c'
+ 'b7b883dc6d35676f93d598daebaa5c90')
+install=madfuload.install
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ patch -p0 < "$srcdir/use-udevadm-in-configure.patch"
+ patch -p0 < "$srcdir/fix-64-bit-implicit-declarations.patch"
+ ./configure --sbindir=/usr/bin --prefix=/usr --with-udev=/etc/udev
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+ install -Dm 644 "$srcdir/42-madfuload.rules" "$pkgdir/etc/udev/rules.d/42-madfuload.rules"
+}
diff --git a/fix-64-bit-implicit-declarations.patch b/fix-64-bit-implicit-declarations.patch
new file mode 100644
index 000000000000..71a73c08a464
--- /dev/null
+++ b/fix-64-bit-implicit-declarations.patch
@@ -0,0 +1,14 @@
+Description: Fixes the implicit declarations warnings and stops segfaults
+on 64 bit architectures
+--- madfuload.c.orig
++++ madfuload.c
+@@ -16,7 +16,8 @@
+ #include <fcntl.h>
+ #include <getopt.h>
+ #include <syslog.h>
+-#include <linux/ioctl.h>
++#include <sys/ioctl.h>
++#include <string.h>
+
+ /* USB stuff -- we can't rely on all Linux headers being there */
+
diff --git a/madfuload.install b/madfuload.install
new file mode 100644
index 000000000000..568e9c5f22f4
--- /dev/null
+++ b/madfuload.install
@@ -0,0 +1,12 @@
+post_install() {
+ echo "Reloading udev rules..."
+ udevadm control --reload-rules
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/use-udevadm-in-configure.patch b/use-udevadm-in-configure.patch
new file mode 100644
index 000000000000..c24c3d283222
--- /dev/null
+++ b/use-udevadm-in-configure.patch
@@ -0,0 +1,11 @@
+--- configure.orig 2011-10-29 15:06:21.656894682 -0400
++++ configure 2011-10-29 15:06:34.410158926 -0400
+@@ -2808,7 +2808,7 @@
+
+ echo "$as_me:$LINENO: checking for udev version" >&5
+ echo $ECHO_N "checking for udev version... $ECHO_C" >&6
+-udev_ver=`udevinfo -V | awk '{ print $3 }'`
++udev_ver=`udevadm -V`
+ if test -n "$udev_ver"; then
+ echo "$as_me:$LINENO: result: $udev_ver" >&5
+ echo "${ECHO_T}$udev_ver" >&6