summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichaël Hauspie2015-09-14 13:25:48 +0200
committerMichaël Hauspie2015-09-14 13:25:48 +0200
commit9934f49b82b02751dd0d2380b6855b0e1da825dc (patch)
treeedf775f9abc9fb19c772deab8ae90b279f28df7e
downloadaur-hxcfloppyemulator-svn.tar.gz
First package version
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD57
-rwxr-xr-xhxcfloppyemulator-svn.install17
3 files changed, 94 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..fde5462ebde7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = hxcfloppyemulator-svn
+ pkgdesc = Software that drives the HxC Floppy USB emulator
+ pkgver = 2.1.1.0.r1339
+ pkgrel = 1
+ url = http://hxc2001.com
+ install = hxcfloppyemulator-svn.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = subversion
+ depends = fltk>=1.3
+ provides = hxcfloppyemulator
+ conflicts = hxcfloppyemulator
+ source = svn://svn.code.sf.net/p/hxcfloppyemu/code/
+ source = http://hxc2001.com/download/floppy_drive_emulator/HxC_Floppy_Emulator_Software_User_Manual_ENG.pdf
+ md5sums = SKIP
+ md5sums = c28fd6219d117b58640eeadcb8d148b8
+
+pkgname = hxcfloppyemulator-svn
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d6c7f45a6ddf
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,57 @@
+# This builds the softwares needed to use hxc usb emulator
+#
+# Maintainer: Michael Hauspie <mickeymtp@gmail.com>
+pkgname=hxcfloppyemulator-svn
+conflicts=('hxcfloppyemulator')
+provides=('hxcfloppyemulator')
+pkgver=2.1.1.0.r1339
+pkgrel=1
+epoch=
+pkgdesc="Software that drives the HxC Floppy USB emulator"
+arch=('i686' 'x86_64')
+url="http://hxc2001.com"
+license=('GPL')
+makedepends=('subversion')
+depends=('fltk>=1.3')
+install=$pkgname.install
+source=('svn://svn.code.sf.net/p/hxcfloppyemu/code/'
+ 'http://hxc2001.com/download/floppy_drive_emulator/HxC_Floppy_Emulator_Software_User_Manual_ENG.pdf'
+)
+md5sums=('SKIP' 'c28fd6219d117b58640eeadcb8d148b8')
+
+prepare() {
+ cd "$srcdir/code/HxCFloppyEmulator/build/"
+ sed -i /fltk-1.3/d Makefile
+ cd "$srcdir/code/HxCFloppyEmulator/HxCFloppyEmulator_software/trunk/build/"
+ # Patch makefile to use system fltk
+ sed -i /^FLTKLIB/d Makefile
+ sed -i 's@-I ../sources/thirdpartylibs/fltk/fltk-1.3.x/@$(shell fltk-config --cxxflags)@g' Makefile
+ sed -i 's@LDFLAGS += -Wl,-rpath=.@LDFLAGS += -Wl,-rpath=. $(shell fltk-config --ldflags)@g' Makefile
+
+
+}
+
+build() {
+ make -C "$srcdir/code/HxCFloppyEmulator/build/"
+}
+
+package() {
+ cd "$srcdir/"
+ mkdir -p "$pkgdir/usr/lib" "$pkgdir/usr/bin" "$pkgdir/usr/share/doc/$pkgname"
+ cp "$srcdir/code/HxCFloppyEmulator/build/hxcfe" "$pkgdir/usr/bin"
+ cp "$srcdir/code/HxCFloppyEmulator/build/hxcfloppyemulator" "$pkgdir/usr/bin"
+ cp "$srcdir/code/HxCFloppyEmulator/build/libhxcfe.so" "$pkgdir/usr/lib"
+ cp "$srcdir/code/HxCFloppyEmulator/build/libusbhxcfe.so" "$pkgdir/usr/lib"
+ cp "$srcdir/HxC_Floppy_Emulator_Software_User_Manual_ENG.pdf" "$pkgdir/usr/share/doc/$pkgname"
+ # Generate the udev rules sample
+ cat > "$pkgdir/usr/share/doc/$pkgname/udev-rules.conf.example" <<EOF
+ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", GROUP="users", MODE="0660", SYMLINK="hxcfloppy", RUN="/sbin/modprobe -r ftdi_sio"
+EOF
+}
+
+pkgver() {
+ cd "$srcdir/code"
+ local rev="$(svnversion)"
+ local ver="$(grep '#define STR_FILE_VERSION2' "$srcdir/code/HxCFloppyEmulator/HxCFloppyEmulator_software/trunk/sources/version.h" | awk '{print $3;}' | tr -d \\\" | sed 's/\s//')"
+ printf "%s.r%s" "${ver//[[:alpha::]]}" "${rev//[[:alpha:]]}"
+}
diff --git a/hxcfloppyemulator-svn.install b/hxcfloppyemulator-svn.install
new file mode 100755
index 000000000000..de3f6738c603
--- /dev/null
+++ b/hxcfloppyemulator-svn.install
@@ -0,0 +1,17 @@
+# Author: Michael Hauspie
+
+post_install()
+{
+ cat <<EOF
+The HxC Floppy emulator directly uses the USB driver to operate.
+However, the kernel first loads the ftdi_sio module which prevents
+the hxc software to detect the usb emulator. To prevent this, you
+can use the udev rules file provided in the /usr/share/doc/hxcfloppyemulator
+and put it in /etc/udev/rules.d.
+
+run 'cp /usr/share/doc/hxcfloppyemulator-svn/udev-rules.conf.example /etc/udev/rules.d/85-hxc.conf' as root
+
+Warning though, this will also prevent any other FTDI devices with same vendorId
+to work correctly.
+EOF
+}