diff options
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | 70-owon-vds-tiny.rules | 1 | ||||
-rw-r--r-- | PKGBUILD | 75 | ||||
-rw-r--r-- | owon-vds-tiny.appdata.xml | 15 | ||||
-rw-r--r-- | owon-vds-tiny.desktop | 10 | ||||
-rw-r--r-- | owon-vds-tiny.install | 20 | ||||
-rwxr-xr-x | owon-vds-tiny.sh | 7 |
7 files changed, 151 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..e5adaf244210 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = owon-vds-tiny-git + pkgdesc = Application for the OWON VDS1022 oscilloscope + pkgver = 1.0.30.cf9.r0.gdf0e1f8 + pkgrel = 1 + url = https://github.com/florentbr/OWON-VDS1022 + install = owon-vds-tiny.install + arch = any + depends = java-runtime + provides = owon-vds-tiny + conflicts = owon-vds-tiny + source = git+https://github.com/florentbr/OWON-VDS1022.git + source = owon-vds-tiny.desktop + source = owon-vds-tiny.appdata.xml + source = 70-owon-vds-tiny.rules + source = owon-vds-tiny.sh + md5sums = SKIP + md5sums = dfc56705643a13b59d13e0926d869de6 + md5sums = daaa9c284a6faec7bdace2a6c1b7e698 + md5sums = a1a166bf4987082729eb4b4bf6830b6f + md5sums = ef800a7e611a34493151cef66a7e606c + +pkgname = owon-vds-tiny-git + diff --git a/70-owon-vds-tiny.rules b/70-owon-vds-tiny.rules new file mode 100644 index 000000000000..32a4cc01961a --- /dev/null +++ b/70-owon-vds-tiny.rules @@ -0,0 +1 @@ +SUBSYSTEMS=="usb", ATTRS{idVendor}=="5345", ATTRS{idProduct}=="1234", GROUP="plugdev", MODE="0666" diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f75bd4c23c87 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,75 @@ +# Maintainer: Antony Jordan <wiccan.two at gmail dot com> +_git_name=OWON-VDS1022 +_pkgname=owon-vds-tiny +pkgname=$_pkgname-git +pkgver=1.0.30.cf9.r0.gdf0e1f8 +pkgrel=1 +pkgdesc="Application for the OWON VDS1022 oscilloscope" +arch=('any') +depends=('java-runtime') +provides=($_pkgname) +conflicts=($_pkgname) +install="$_pkgname.install" +source=( + "git+https://github.com/florentbr/$_git_name.git" + "$_pkgname.desktop" + "$_pkgname.appdata.xml" + "70-$_pkgname.rules" + "$_pkgname.sh" +) +md5sums=( + "SKIP" + "dfc56705643a13b59d13e0926d869de6" + "daaa9c284a6faec7bdace2a6c1b7e698" + "a1a166bf4987082729eb4b4bf6830b6f" + "ef800a7e611a34493151cef66a7e606c" +) +url="https://github.com/florentbr/$_git_name" +pkgver() { + cd "$srcdir/$_git_name" + git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} +package() { + + mv "$srcdir/$_git_name/lib/linux/amd64" "$srcdir/$_git_name/lib/linux/x86_64" + + echo 'Add usb permissions ...' + + PK_RULES_DIR="$pkgdir/usr/lib/udev/rules.d" + mkdir -p "$PK_RULES_DIR" + cp "$srcdir/70-$_pkgname.rules" "$PK_RULES_DIR" + + echo 'Add application files ...' + + PK_LIB_DIR="$pkgdir/usr/lib/$_pkgname" + PK_APP_DIR="$pkgdir/usr/share/$_pkgname" + + mkdir -p "$PK_LIB_DIR" + mkdir -p "$PK_APP_DIR" + mkdir -p "$pkgdir/usr/bin" + + cp "$srcdir/$_git_name/lib/linux/$CARCH/librxtxSerial.so" "$PK_LIB_DIR" + cp "$srcdir/$_git_name/lib/linux/$CARCH/libusb-0.1.so.4" "$PK_LIB_DIR" + cp "$srcdir/$_git_name/lib/linux/$CARCH/libusbJava.so" "$PK_LIB_DIR" + cp -r "$srcdir/$_git_name/doc" "$PK_APP_DIR" + cp -r "$srcdir/$_git_name/fwr" "$PK_APP_DIR" + cp -r "$srcdir/$_git_name/jar" "$PK_APP_DIR" + cp "$srcdir/$_git_name/version.txt" "$PK_APP_DIR" + cp "$srcdir/$_pkgname.sh" "$pkgdir/usr/bin/$_pkgname" + chmod +x "$pkgdir/usr/bin/$_pkgname" + + echo 'Add launcher ...' + + PK_PIXMAP_DIR="$pkgdir/usr/share/pixmaps" + PK_APPLICATIONS_DIR="$pkgdir/usr/share/applications" + PK_APPDATA_DIR="$pkgdir/usr/share/appdata" + + mkdir -p "$PK_PIXMAP_DIR" + mkdir -p "$PK_APPLICATIONS_DIR" + mkdir -p "$PK_APPDATA_DIR" + + cp "$srcdir/$_git_name/ico/icon48.png" "$PK_PIXMAP_DIR/$_pkgname.png" + cp "$srcdir/$_pkgname.desktop" "$PK_APPLICATIONS_DIR" + cp "$srcdir/$_pkgname.appdata.xml" "$PK_APPDATA_DIR" +} + diff --git a/owon-vds-tiny.appdata.xml b/owon-vds-tiny.appdata.xml new file mode 100644 index 000000000000..f5b0ec615106 --- /dev/null +++ b/owon-vds-tiny.appdata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<component type="desktop"> + <id>owon-vds-tiny</id> + <name>OWON VDS1022 Oscilloscope</name> + <summary>Application for the OWON VDS1022 oscilloscope</summary> + <description><p>Unofficial release with a few fixes and improvements: + * New shortcuts: single trigger, trigger level, offsets, coupling, inversion, reset ... + * Disabled annoying dock animations + * Disabled leave/stop confirmation while recording/playing + * ...</p></description> + <launchable type="desktop-id">owon-vds-tiny.desktop</launchable> + <url type="homepage">https://github.com/florentbr/Owon-VDS1022</url> + <provides><binary>owon-vds-tiny</binary></provides> + <update_contact>florentbr@gmail.com</update_contact> +</component> diff --git a/owon-vds-tiny.desktop b/owon-vds-tiny.desktop new file mode 100644 index 000000000000..3258bd76a65f --- /dev/null +++ b/owon-vds-tiny.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=OWON VDS1022 Oscilloscope +GenericName=Oscilloscope +Comment=Analyze an electrical signal +Exec=owon-vds-tiny +Icon=owon-vds-tiny +Terminal=false +Type=Application +Categories=Electronics;Engineering; + diff --git a/owon-vds-tiny.install b/owon-vds-tiny.install new file mode 100644 index 000000000000..551f1713b65e --- /dev/null +++ b/owon-vds-tiny.install @@ -0,0 +1,20 @@ +pre_install () { + rm -f \"/etc/udev/rules.d/*owon*.rules\" + rm -f \"$PK_USER_DIR/preferences*\" +} +post_install () { + udevadm control --reload-rules + udevadm trigger +} +post_remove () { + rm -rf \"$PK_USER_DIR\" +} +pre_upgrade () { + rm -f \"/etc/udev/rules.d/*owon*.rules\" + rm -f \"$PK_USER_DIR/preferences*\" +} +post_upgrade () { + udevadm control --reload-rules + udevadm trigger +} + diff --git a/owon-vds-tiny.sh b/owon-vds-tiny.sh new file mode 100755 index 000000000000..3e26c370f6e6 --- /dev/null +++ b/owon-vds-tiny.sh @@ -0,0 +1,7 @@ +#!/bin/bash +export LD_LIBRARY_PATH=/usr/lib/owon-vds-tiny +java \ + -Djava.library.path='/usr/lib/owon-vds-tiny' \ + -Duser.dir="$HOME/.owon-vds-tiny" \ + -cp '/usr/share/owon-vds-tiny/jar/*' \ + com.owon.vds.tiny.Main |