File: PKGBUILD

package info (click to toggle)
bladerf 0.2017.12~rc1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 14,620 kB
  • sloc: ansic: 50,123; vhdl: 12,873; python: 1,062; tcl: 1,060; xml: 1,017; makefile: 657; sh: 589; csh: 18; cpp: 9
file content (73 lines) | stat: -rw-r--r-- 2,110 bytes parent folder | download | duplicates (2)
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
63
64
65
66
67
68
69
70
71
72
73
# Maintainer: Guido Paliot <guido@paliot.de>
pkgname=bladerf-util-git
pkgver=df0f495
pkgrel=1
pkgdesc="Utils, libraries and prebuilt firmware for the Nuand bladeRF"
arch=('x86_64')
url="https://github.com/Nuand/bladeRF"
license=('GPL')
depends=('libtecla' 'libusb>=1.0.12')
makedepends=('git')
optdepends=(
	'bladerf:	Linux kernel driver backend for bladeRF'
)
conflicts=('bladerf-util')
provides=('bladerf-util')
backup=(etc/bladerf.cfg)
source=('bladeRF::git+https://github.com/Nuand/bladeRF#branch=master'
        'https://www.nuand.com/fx3/bladeRF_fw_v2.0.0.img'
        'https://www.nuand.com/fpga/v0.7.1/hostedx40.rbf'
        'https://www.nuand.com/fpga/v0.7.1/hostedx115.rbf'
)
sha1sums=(
        'SKIP'
        '25dd40565e14051b3a3195fa6784ee5cb2a8e8a2'
        '07c491710c9fab0e9b952fb2adc59e62f6693d50'
        'bf1464df78b2c18f0d711108550e30692b536ea4'
)


_gitname=bladeRF

pkgver() {
    cd $_gitname
      # Use the tag of the last commit
        git describe --always | sed 's|-|.|g'
      }

build() {
  cd "$srcdir"
  msg "Connecting to GIT server...."

  if [[ -d "$_gitname" ]]; then
    cd "$_gitname" && git pull origin
    msg "The local files are updated."
  else
    git clone "$_gitroot" "$_gitname"
  fi

  msg "GIT checkout done or server timeout"
  msg "Starting build..."

  rm -rf "$srcdir/$_gitname-build"
  git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"

  cd "$srcdir/$_gitname-build/host"

  cmake -DCMAKE_INSTALL_PREFIX=/usr -DINSTALL_UDEV_RULES=ON -DENABLE_BACKEND_LINUX_DRIVER=OFF -DENABLE_BACKEND_LIBUSB=ON -DLIBTECLA_INCLUDE_DIR=/usr/include -DCMAKE_BUILD_TYPE=Release .

  make
}

package() {

  cd "$srcdir/$_gitname-build/host"
  make DESTDIR=$pkgdir install
  mkdir -p $pkgdir/usr/share/Nuand/bladeRF/fpga
  mkdir $pkgdir/usr/share/Nuand/bladeRF/firmware
  cp $srcdir/bladeRF_fw_v2.0.0.img $pkgdir/usr/share/Nuand/bladeRF/firmware/bladeRF_fw.img
  cp $srcdir/hostedx40.rbf $pkgdir/usr/share/Nuand/bladeRF/fpga/
  cp $srcdir/hostedx115.rbf $pkgdir/usr/share/Nuand/bladeRF/fpga/
  cp $srcdir/$_gitname-build/COPYING $pkgdir/usr/share/Nuand/bladeRF/LICENSE
}