summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cc8ba91c7adadc4496e0f236a9019f3bc2e57297 (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
# Maintainer: Forest Crossman <cyrozap at gmail dot com>

pkgname=pixelpulse2-git
pkgver=1.0.4.r1.g972b7e8
pkgrel=1
pkgdesc="A user interface for analog systems exploration."
arch=('i686' 'x86_64')
url="https://github.com/analogdevicesinc/Pixelpulse2"
license=('custom:MPLv2')
depends=('libusb' 'qt5-quickcontrols')
makedepends=('git')
install=${pkgname}.install
source=("$pkgname::git+https://github.com/analogdevicesinc/Pixelpulse2.git")
md5sums=('SKIP')

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

prepare() {
  cd $pkgname
  git submodule update --init
}

build() {
  cd $pkgname
  mkdir -p build
  cd build
  qmake-qt5 ..
  make
}

package() {
  cd $pkgname

  # Install the license
  install -d "$pkgdir"/usr/share/licenses/pixelpulse2-git/
  install -m 644 LICENSE "$pkgdir"/usr/share/licenses/pixelpulse2-git/

  # Install the executable
  install -d "$pkgdir"/usr/bin/
  install -m 755 build/pixelpulse2 "$pkgdir"/usr/bin/

  # freedesktop.org support
  install -d "$pkgdir"/usr/share/applications/
  install -m 644 debian/pixelpulse2.desktop "$pkgdir"/usr/share/applications/
  install -d "$pkgdir"/usr/share/icons/
  install -m 644 debian/pp2.png "$pkgdir"/usr/share/icons/
}