summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnatol Pomozov2015-06-17 08:44:51 -0700
committerAnatol Pomozov2015-06-17 08:44:51 -0700
commitc4c39767cf54ccbe81434e28d8f03496df8799e3 (patch)
treed863fe601d0daa050b296c534d07a872d384dd54
downloadaur-c4c39767cf54ccbe81434e28d8f03496df8799e3.tar.gz
Initial import
-rw-r--r--.SRCINFO28
-rw-r--r--0001-Fix-compilation-error.patch31
-rw-r--r--0002-Instead-of-polluting-bin-use-usr-share-path-for-reso.patch59
-rw-r--r--PKGBUILD50
-rw-r--r--dsview.desktop5
-rw-r--r--dsview.install11
-rw-r--r--udev.rules6
7 files changed, 190 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..0d2c97a718c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,28 @@
+pkgbase = dsview-git
+ pkgdesc = GUI programe for supporting various instruments from DreamSourceLab, including logic analyzer, oscilloscope, etc.
+ pkgver = 0.3.r54.g71d0f5a
+ pkgrel = 1
+ url = http://www.dreamsourcelab.com/
+ install = dsview.install
+ arch = i686
+ arch = x86_64
+ license = GPL3
+ makedepends = boost
+ makedepends = cmake
+ depends = boost-libs
+ depends = qt5-base
+ depends = libsigrok4dsl-git
+ depends = libsigrokdecode
+ source = git://github.com/DreamSourceLab/DSView
+ source = 0001-Fix-compilation-error.patch
+ source = 0002-Instead-of-polluting-bin-use-usr-share-path-for-reso.patch
+ source = udev.rules
+ source = dsview.desktop
+ md5sums = SKIP
+ md5sums = 1e65dd1e0a3154296f37429ff2f6e817
+ md5sums = ee5cc08bff5f6a23ef4ba5fdfbf956a1
+ md5sums = af6d97ba0fbea628e320bdb4b469b766
+ md5sums = 095886809795b40d663bfe4b79395811
+
+pkgname = dsview-git
+
diff --git a/0001-Fix-compilation-error.patch b/0001-Fix-compilation-error.patch
new file mode 100644
index 00000000000..c8f5fc69c5a
--- /dev/null
+++ b/0001-Fix-compilation-error.patch
@@ -0,0 +1,31 @@
+From a55609ad36a768a8e70c242719b050902c99c2d2 Mon Sep 17 00:00:00 2001
+From: Anatol Pomozov <anatol.pomozov@gmail.com>
+Date: Fri, 15 May 2015 16:04:00 -0700
+Subject: [PATCH 1/2] Fix compilation error
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+/home/anatol/sources/archpackages/dsview-git/src/DSView/DSView/pv/data/decode/annotation.cpp: In constructor ‘pv::data::decode::Annotation::Annotation(const srd_proto_data*)’:
+/home/anatol/sources/archpackages/dsview-git/src/DSView/DSView/pv/data/decode/annotation.cpp:43:17: error: ‘const struct srd_proto_data_annotation’ has no member named ‘ann_class’
+ _format = pda->ann_class;
+---
+ DSView/pv/data/decode/annotation.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/DSView/pv/data/decode/annotation.cpp b/DSView/pv/data/decode/annotation.cpp
+index 32d3897..c3c7440 100644
+--- a/DSView/pv/data/decode/annotation.cpp
++++ b/DSView/pv/data/decode/annotation.cpp
+@@ -40,7 +40,7 @@ Annotation::Annotation(const srd_proto_data *const pdata) :
+ (const srd_proto_data_annotation*)pdata->data;
+ assert(pda);
+
+- _format = pda->ann_class;
++ _format = pda->ann_format;
+
+ const char *const *annotations = (char**)pda->ann_text;
+ while(*annotations) {
+--
+2.4.1
+
diff --git a/0002-Instead-of-polluting-bin-use-usr-share-path-for-reso.patch b/0002-Instead-of-polluting-bin-use-usr-share-path-for-reso.patch
new file mode 100644
index 00000000000..e7dacdfc858
--- /dev/null
+++ b/0002-Instead-of-polluting-bin-use-usr-share-path-for-reso.patch
@@ -0,0 +1,59 @@
+From f8cb9408922e777cd688787dd373faaf27650ca0 Mon Sep 17 00:00:00 2001
+From: Anatol Pomozov <anatol.pomozov@gmail.com>
+Date: Fri, 15 May 2015 16:28:42 -0700
+Subject: [PATCH 2/2] Instead of polluting bin use /usr/share/ path for
+ resources
+
+---
+ DSView/CMakeLists.txt | 14 +++++++-------
+ DSView/pv/devicemanager.cpp | 4 ++++
+ 2 files changed, 11 insertions(+), 7 deletions(-)
+
+diff --git a/DSView/CMakeLists.txt b/DSView/CMakeLists.txt
+index 2f5eb78..1882843 100644
+--- a/DSView/CMakeLists.txt
++++ b/DSView/CMakeLists.txt
+@@ -350,13 +350,13 @@ set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "/usr/local/lib")
+
+ # Install the executable.
+ install(TARGETS ${PROJECT_NAME} DESTINATION bin/)
+-install(FILES res/DSLogic.fw DESTINATION bin/res/)
+-install(FILES res/DSLogic33.bin DESTINATION bin/res/)
+-install(FILES res/DSLogic50.bin DESTINATION bin/res/)
+-install(FILES res/DSLogicPro.fw DESTINATION bin/res/)
+-install(FILES res/DSLogicPro.bin DESTINATION bin/res/)
+-install(FILES res/DSCope.fw DESTINATION bin/res/)
+-install(FILES res/DSCope.bin DESTINATION bin/res/)
++install(FILES res/DSLogic.fw DESTINATION share/dsview/)
++install(FILES res/DSLogic33.bin DESTINATION share/dsview/)
++install(FILES res/DSLogic50.bin DESTINATION share/dsview/)
++install(FILES res/DSLogicPro.fw DESTINATION share/dsview/)
++install(FILES res/DSLogicPro.bin DESTINATION share/dsview/)
++install(FILES res/DSCope.fw DESTINATION share/dsview/)
++install(FILES res/DSCope.bin DESTINATION share/dsview/)
+
+ #===============================================================================
+ #= Packaging (handled by CPack)
+diff --git a/DSView/pv/devicemanager.cpp b/DSView/pv/devicemanager.cpp
+index e4a2b6e..b94cbf3 100644
+--- a/DSView/pv/devicemanager.cpp
++++ b/DSView/pv/devicemanager.cpp
+@@ -103,11 +103,15 @@ std::list<boost::shared_ptr<device::DevInst> > DeviceManager::driver_scan(
+
+ // Check If DSL hardware driver
+ if (strcmp(driver->name, "demo") != 0) {
++ /*
+ QDir dir(QCoreApplication::applicationDirPath());
+ if (!dir.cd("res"))
+ return driver_devices;
+ std::string str = dir.absolutePath().toStdString() + "/";
+ strcpy(config_path, str.c_str());
++ */
++ // dirty
++ strcpy(config_path, "/usr/share/dslogic/");
+ }
+
+ // Do the scan
+--
+2.4.1
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..d8c196cdff0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Anatol Pomozov
+# Contributor: Thomas Krug <t.krug@elektronenpumpe.de>
+
+pkgname=dsview-git
+pkgver=0.3.r54.g71d0f5a
+pkgrel=1
+pkgdesc='GUI programe for supporting various instruments from DreamSourceLab, including logic analyzer, oscilloscope, etc.'
+arch=(i686 x86_64)
+url='http://www.dreamsourcelab.com/'
+license=(GPL3)
+depends=(boost-libs qt5-base libsigrok4dsl-git libsigrokdecode)
+makedepends=(boost cmake)
+source=(git://github.com/DreamSourceLab/DSView
+ 0001-Fix-compilation-error.patch
+ 0002-Instead-of-polluting-bin-use-usr-share-path-for-reso.patch
+ udev.rules
+ dsview.desktop)
+md5sums=('SKIP'
+ '1e65dd1e0a3154296f37429ff2f6e817'
+ 'ee5cc08bff5f6a23ef4ba5fdfbf956a1'
+ 'af6d97ba0fbea628e320bdb4b469b766'
+ '095886809795b40d663bfe4b79395811')
+install=dsview.install
+
+pkgver() {
+ cd "$srcdir/DSView"
+ git describe --long | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "$srcdir/DSView"
+ patch -p1 < "$srcdir/0001-Fix-compilation-error.patch"
+ patch -p1 < "$srcdir/0002-Instead-of-polluting-bin-use-usr-share-path-for-reso.patch"
+}
+
+build() {
+ cd "$srcdir/DSView/DSView"
+
+ cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_SKIP_RPATH=1 .
+ make
+}
+
+package() {
+ cd "$srcdir/DSView/DSView"
+
+ make DESTDIR="$pkgdir" install
+
+ install -Dm644 "$srcdir/dsview.desktop" "$pkgdir/usr/share/applications/dsview.desktop"
+ install -Dm644 "$srcdir/udev.rules" "$pkgdir/usr/lib/udev/rules.d/20-dsview.rules"
+}
diff --git a/dsview.desktop b/dsview.desktop
new file mode 100644
index 00000000000..18388d1a5b9
--- /dev/null
+++ b/dsview.desktop
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Exec=DSView
+Name=DSView
+Type=Application
+Categories=Development
diff --git a/dsview.install b/dsview.install
new file mode 100644
index 00000000000..aa8b4c228ac
--- /dev/null
+++ b/dsview.install
@@ -0,0 +1,11 @@
+post_install() {
+ update-desktop-database -q
+}
+
+post_upgrade(){
+ update-desktop-database -q
+}
+
+post_remove() {
+ update-desktop-database -q
+}
diff --git a/udev.rules b/udev.rules
new file mode 100644
index 00000000000..443a1a99a83
--- /dev/null
+++ b/udev.rules
@@ -0,0 +1,6 @@
+## DSLogic
+# 2a0e:0001
+ATTRS{idVendor}=="2a0e", ATTRS{idProduct}=="0001", ENV{ID_MM_DEVICE_IGNORE}="1"
+ATTRS{idVendor}=="2a0e", ATTRS{idProduct}=="0001", ENV{MTP_NO_PROBE}="1"
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a0e", ATTRS{idProduct}=="0001", GROUP="plugdev", MODE="0660"
+