New package: dfu-programmer 0.7.2
This commit is contained in:
60
mingw-w64-dfu-programmer/01-use-libusb-win32.patch
Normal file
60
mingw-w64-dfu-programmer/01-use-libusb-win32.patch
Normal file
@@ -0,0 +1,60 @@
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -41,9 +41,9 @@
|
||||
dnl Fallback to the old libusb
|
||||
dnl libusb >= 0.1.8 is required, as we need usb_interrupt_read()
|
||||
AS_ECHO("using libusb");
|
||||
- AC_CHECK_HEADER(usb.h,
|
||||
- AC_CHECK_LIB(usb, usb_interrupt_read,
|
||||
- [LIBS="$LIBS -lusb"
|
||||
+ AC_CHECK_HEADER(lusb0_usb.h,
|
||||
+ AC_CHECK_LIB(usb0, usb_interrupt_read,
|
||||
+ [LIBS="$LIBS -lusb0"
|
||||
HAVE_USB=yes]))
|
||||
fi
|
||||
|
||||
|
||||
--- a/src/dfu-device.h
|
||||
+++ b/src/dfu-device.h
|
||||
@@ -8,7 +8,7 @@
|
||||
#ifdef HAVE_LIBUSB_1_0
|
||||
#include <libusb.h>
|
||||
#else
|
||||
-#include <usb.h>
|
||||
+#include <lusb0_usb.h>
|
||||
#endif
|
||||
|
||||
// Atmel device classes are now defined with one bit per class.
|
||||
--- a/src/dfu.c
|
||||
+++ b/src/dfu.c
|
||||
@@ -29,7 +29,7 @@
|
||||
#ifdef HAVE_LIBUSB_1_0
|
||||
#include <libusb.h>
|
||||
#else
|
||||
-#include <usb.h>
|
||||
+#include <lusb0_usb.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
#include "dfu.h"
|
||||
--- a/src/dfu.h
|
||||
+++ b/src/dfu.h
|
||||
@@ -27,7 +27,7 @@
|
||||
#ifdef HAVE_LIBUSB_1_0
|
||||
#include <libusb.h>
|
||||
#else
|
||||
-#include <usb.h>
|
||||
+#include <lusb0_usb.h>
|
||||
#endif
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
--- a/src/main.c
|
||||
+++ b/src/main.c
|
||||
@@ -26,7 +26,7 @@
|
||||
#ifdef HAVE_LIBUSB_1_0
|
||||
#include <libusb.h>
|
||||
#else
|
||||
-#include <usb.h>
|
||||
+#include <lusb0_usb.h>
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
41
mingw-w64-dfu-programmer/PKGBUILD
Normal file
41
mingw-w64-dfu-programmer/PKGBUILD
Normal file
@@ -0,0 +1,41 @@
|
||||
# Maintainer: fauxpark <fauxpark@gmail.com>
|
||||
|
||||
_realname=dfu-programmer
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=${MINGW_PACKAGE_PREFIX}-${_realname}
|
||||
pkgver=0.7.2
|
||||
pkgrel=1
|
||||
pkgdesc='Device firmware update based USB programmer for Atmel chips (mingw-w64)'
|
||||
arch=('any')
|
||||
license=('GPL')
|
||||
url='https://github.com/dfu-programmer/dfu-programmer'
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-libusb-win32")
|
||||
source=(
|
||||
"https://downloads.sourceforge.net/project/dfu-programmer/dfu-programmer/${pkgver}/dfu-programmer-${pkgver}.tar.gz"
|
||||
01-use-libusb-win32.patch
|
||||
)
|
||||
sha256sums=(
|
||||
'1db4d36b1aedab2adc976e8faa5495df3cf82dc4bf883633dc6ba71f7c4af995'
|
||||
'7c8d27dbc8b24aefa54514594711301852741021623b25af136271d767a0fdc8'
|
||||
)
|
||||
|
||||
prepare() {
|
||||
cd ${srcdir}/${_realname}-${pkgver}
|
||||
|
||||
patch -p1 -i ../01-use-libusb-win32.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${srcdir}/${_realname}-${pkgver}
|
||||
|
||||
./bootstrap.sh
|
||||
./configure \
|
||||
--prefix=${MINGW_PREFIX} \
|
||||
--disable-libusb_1_0
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${srcdir}/${_realname}-${pkgver}
|
||||
|
||||
make DESTDIR="$pkgdir" install
|
||||
}
|
||||
Reference in New Issue
Block a user