summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6e91513b0d813312d02495be3b2cd8ec46a5851d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Maintainer: Anatol Pomozov
# Contributor: Thomas Krug <t.krug@elektronenpumpe.de>

pkgname=dsview-git
pkgver=0.94.r2.g1cd6420
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-found-at-Linux-Arch.patch
        0002-Use-usr-share-for-resource-files-bin-folder-is-for-b.patch
        0003-Fix-compile-error.patch
        udev.rules
        dsview.desktop)
sha1sums=('SKIP'
          'e5ae41c0157e8e318866be7785ff9bee3198d387'
          '0fe0fb09ce13383c26c39f016d23a37a9af82bef'
          '64fb34f100c4a94ab497581a871f006012727b5c'
          '50f23061fcd03e0aafdefb3b676f1846c036c856'
          '96d3a0168f392af655e2b309711d7810ad3c022f')
install=dsview.install

pkgver() {
  cd DSView
  git describe --long | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g'
}

prepare() {
  cd DSView
  patch -p1 < "$srcdir/0001-Fix-compilation-error-found-at-Linux-Arch.patch"
  patch -p1 < "$srcdir/0002-Use-usr-share-for-resource-files-bin-folder-is-for-b.patch"
  patch -p1 < "$srcdir/0003-Fix-compile-error.patch"
}

build() {
  cd DSView/DSView

  cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_SKIP_RPATH=1 .

  # for f in $(find . -type f -name "*.png"); do echo "Processing $f ..."; convert $f -strip $f; done
  make
}

package() {
  cd DSView/DSView

  make DESTDIR="$pkgdir" install

  install -Dm644 icons/logo_color.png "$pkgdir/usr/share/pixmaps/dsview.png"

  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"
}