summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 41308223b70cb49bc8a845cc59d2d38fe9f57306 (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: Tobias Markus < tobias AT miglix DOT eu >
# Contributor: Thomas Gatzweiler <thomas.gatzweiler@gmail.com>

_basename=wsjtx
pkgname="${_basename}-system-hamlib"
pkgver=2.2.1
pkgrel=1
pkgdesc="Software for Amateur Radio Weak-Signal Communication (JT9 and JT65) - no superbuild (uses system hamlib and boost)"
arch=('i686' 'x86_64')
url="http://physics.princeton.edu/pulsar/k1jt/wsjtx.html"
license=('GPL3')
provides=('wsjtx')
conflicts=('wsjtx')
makedepends=(cmake asciidoc asciidoctor gcc-fortran boost)
depends=(
    qt5-base qt5-multimedia qt5-serialport qt5-tools
    hamlib libusb libusb-compat libpulse libpng fftw
    boost-libs
    )
source=("${_basename}-${pkgver}.tar.gz::http://physics.princeton.edu/pulsar/K1JT/${_basename}-${pkgver}.tgz"
        cmakelists.patch
        findhamlib.patch)
sha1sums=('e2dbbc84324b64b0b2de0b6a7aa510a5153e0ed0'
          'bb4c6ce9dae4b5ae211a7fd6b24f6e1a6ed289f8'
          'f406cde650b080184bc3e2e9e8d42eceb7da5cd5')

prepare() {
    cd "$srcdir"

    bsdtar -xf "${_basename}-${pkgver}/src/wsjtx.tgz"

    patch -u -p1 -i cmakelists.patch
    patch -u -p1 -i findhamlib.patch

    cd "$srcdir/$_basename"
    rm -rf boost
}

build() {
    cd "$srcdir"

    export CFLAGS+=" ${CPPFLAGS}"
    export CXXFLAGS+=" ${CPPFLAGS}"
    cmake -B build \
        -S "$_basename" \
        -Wno-dev \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE=None \
        -Dhamlib_STATIC=false
    make -C build
}

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