summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d528df3f0adc4b6fca718b84eacb67829b5731f0 (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
58
59
60
61
62
# Maintainer: EndlessEden <eden [at] rose.place>
# Previous Maintainer: Michal Krenek (Mikos) <m.krenek@gmail.com>

pkgname=rtlsdr-airband-git
pkgver=5.0.12.0.ge7cd0ec
pkgrel=1
pkgdesc="RTLSDR AM demodulator, support multiple channels per dongle"
arch=('i686' 'x86_64')
url="https://github.com/charlie-foxtrot/RTLSDR-Airband"
license=('GPL3')
depends=('rtl-sdr' 'fftw' 'libvorbis' 'lame' 'libshout' 'libconfig' 'soapysdr')
makedepends=('git')
optdepends=('soapysdr')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('rtlsdr-airband::git+https://github.com/charlie-foxtrot/RTLSDR-Airband.git#branch=main'
'rtl_airband.conf.example')
md5sums=('SKIP'
'83c1de3720baca0e2222b6e1abfade1c')
sha256sums=('SKIP'
'SKIP')

pkgver() {
    cd "$srcdir/${pkgname%-git}"
   
    echo "$(git describe --tags --long | sed 's/^v//; s/-/./g')"
}

prepare() {
    cd "$srcdir/${pkgname%-git}"
    mkdir -p BUILD
}

build() {
    cd "$srcdir/${pkgname%-git}"
    cd BUILD

    cmake .. \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_SYSCONFDIR=/etc/rtl_airband \
    -DNFM=ON \
    -DRTLSDR=ON \
    -DSOAPYSDR=ON #\ ## Next line RPI only
    #-DBCM_VC=ON ## RPI Support

    make
}

package() {
    cd "$srcdir"/"${pkgname%-git}"/BUILD
    make install
    install -Dm 0755 "$srcdir"/"${pkgname%-git}"/BUILD/src/rtl_airband "${pkgdir}"/usr/bin/rtl_airband
    install -Dm 0600 "$srcdir"/"${pkgname%-git}"/config/basic_multichannel.conf  "${pkgdir}"/etc/rtl_airband/basic_multichannel.conf
    install -Dm 0600 "$srcdir"/"${pkgname%-git}"/config/basic_scanning.conf "${pkgdir}"/etc/rtl_airband/basic_scanning.conf
    install -Dm 0600 "$srcdir"/"${pkgname%-git}"/config/mixers.conf "${pkgdir}"/etc/rtl_airband/mixers.conf
    install -Dm 0600 "$srcdir"/"${pkgname%-git}"/config/two_dongles_multiple_outputs.conf  "${pkgdir}"/etc/rtl_airband/two_dongles_multiple_outputs.conf
    if [ -e "$srcdir"/"${pkgname%-git}"/config/reference.conf ];then
    	install -Dm 0600 "$srcdir"/"${pkgname%-git}"/config/reference.conf "${pkgdir}"/etc/rtl_airband/rtl_airband.conf
    else
    	install -Dm 0600 "$srcdir"/rtl_airband.conf.example "${pkgdir}"/etc/rtl_airband/rtl_airband.conf
    fi
}