summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 41db7d0a6ed008aba6ce4b4bf5bcd3e27af75e91 (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
# Maintainer: Michal Krenek (Mikos) <m.krenek@gmail.com>
pkgname=sdrangel-git
pkgver=r1123.83d5703
pkgrel=1
pkgdesc="Qt5/OpenGL SDR and signal analyzer frontend for Airspy, BladeRF, HackRF, RTL-SDR and FunCube"
arch=('i686' 'x86_64')
url="https://github.com/f4exb/sdrangel"
license=('GPL3')
depends=('gnuradio-osmosdr' 'boost' 'fftw' 'log4cpp' 'pkg-config' 'lz4' 'nanomsg' 'dsdcc-git' 'pulseaudio'
         'qt5-base' 'qt5-tools' 'qt5-multimedia')
makedepends=('git' 'cmake')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/f4exb/sdrangel.git')
sha256sums=('SKIP')

pkgver() {
    cd "$srcdir/${pkgname%-git}"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd "$srcdir/${pkgname%-git}"
    mkdir build
    cd build
    cmake .. \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/opt/sdrangel \
        -DLIBDSDCC_INCLUDE_DIR=/usr/include/dsdcc
    make
}

package() {
    cd "$srcdir/${pkgname%-git}/build"
    make DESTDIR="$pkgdir/" install

    # For some reason SDRangel only works if it is installed outside of /usr,
    # so we install it into /opt/sdrangel and create link to it in /usr/bin
    install -d "${pkgdir}/usr/bin"
    ln -s /opt/sdrangel/bin/sdrangel "${pkgdir}/usr/bin/sdrangel"
}