Skip to content

Commit

Permalink
sdrangel: add package
Browse files Browse the repository at this point in the history
  • Loading branch information
D3vil0p3r committed Nov 25, 2024
1 parent 03f0327 commit 2497427
Show file tree
Hide file tree
Showing 15 changed files with 651 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lists/to-release
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
aptdec
libdab
liblms7002m-xtrx
libmirisdr4
libperseus-sdr
libusb3380
libxtrx
libxtrxdsp
libxtrxll
qt5-gamepad
sgp4
sdrangel
52 changes: 52 additions & 0 deletions packages/aptdec/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=aptdec
pkgver=v1.8.0.r2.g7db2030
pkgrel=1
pkgdesc='NOAA APT satellite imagery decoder.'
arch=('x86_64' 'aarch64')
groups=('blackarch' 'blackarch-radio')
url='https://github.com/Xerbo/aptdec'
license=('GPL-2.0-or-later')
depends=('libsndfile' 'libpng')
makedepends=('git' 'cmake')
source=("git+https://github.com/Xerbo/$pkgname.git"
"git+https://github.com/cofyc/argparse.git")
sha512sums=('SKIP'
'SKIP')

pkgver() {
cd $pkgname

( set -o pipefail
git describe --long --tags --abbrev=7 2>/dev/null |
sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "%s.%s" "$(git rev-list --count HEAD)" \
"$(git rev-parse --short=7 HEAD)"
)
}

prepare() {
cd $pkgname

git submodule init
git config submodule.src/argparse.url "$srcdir/argparse"
git -c protocol.file.allow=always submodule update
}

build() {
cd $pkgname

cmake -B build \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX='/usr'
make -C build
}

package() {
cd $pkgname

make -C build DESTDIR="$pkgdir" install
}

44 changes: 44 additions & 0 deletions packages/libdab/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=libdab
_pkgname=dab-cmdline
pkgver=dab.cmdline.0.8.r310.g982a804
pkgrel=1
pkgdesc='DAB decoding library.'
arch=('x86_64' 'aarch64')
url='https://github.com/JvanKatwijk/dab-cmdline'
license=('GPL-2.0-or-later')
depends=('fftw' 'faad2')
makedepends=('cmake' 'git')
provides=('libdab_lib.so')
source=("git+https://github.com/JvanKatwijk/$_pkgname.git")
sha512sums=('SKIP')

pkgver() {
cd $_pkgname

( set -o pipefail
git describe --long --tags --abbrev=7 2>/dev/null |
sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "%s.%s" "$(git rev-list --count HEAD)" \
"$(git rev-parse --short=7 HEAD)"
)
}

build() {
cd $_pkgname

cmake -B build -S "library" \
-Wno-dev \
-DCMAKE_BUILD_TYPE='None' \
-DCMAKE_INSTALL_PREFIX=/usr
make -C build
}

package() {
cd $_pkgname

make -C build DESTDIR="$pkgdir" install
}

47 changes: 47 additions & 0 deletions packages/liblms7002m-xtrx/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=liblms7002m-xtrx
_pkgname=liblms7002m
pkgver=10.b07761b
pkgrel=1
pkgdesc='Compact LMS7002M library suitable for resource-limited MCUs.'
arch=('x86_64' 'aarch64')
url='https://github.com/xtrx-sdr/liblms7002m'
license=('LGPL-2.1-or-later')
depends=()
makedepends=('git' 'cmake' 'python-cheetah3')
source=("git+https://github.com/xtrx-sdr/$_pkgname.git")
sha512sums=('SKIP')

pkgver() {
cd $_pkgname

( set -o pipefail
git describe --long --tags --abbrev=7 2>/dev/null |
sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "%s.%s" "$(git rev-list --count HEAD)" \
"$(git rev-parse --short=7 HEAD)"
)
}

build() {
cd $_pkgname

mkdir -p build
cd build

cmake .. \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release

make
}

package() {
cd $_pkgname

make -C build DESTDIR="$pkgdir" install
}

45 changes: 45 additions & 0 deletions packages/libmirisdr4/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=libmirisdr4
_pkgname=libmirisdr-4
pkgver=v2.0.0.r0.gfd0452e
pkgrel=1
pkgdesc='Support of Mirics MSi001 + MSi2500 SDR devices (yet another flavour of libmirisdr).'
arch=('x86_64' 'aarch64')
groups=('blackarch' 'blackarch-radio')
url='https://github.com/f4exb/libmirisdr-4'
license=('GPL-2.0-or-later')
depends=('libusb')
makedepends=('git' 'cmake')
source=("git+https://github.com/f4exb/$_pkgname.git")
sha512sums=('SKIP')

pkgver() {
cd $_pkgname

( set -o pipefail
git describe --long --tags --abbrev=7 2>/dev/null |
sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "%s.%s" "$(git rev-list --count HEAD)" \
"$(git rev-parse --short=7 HEAD)"
)
}

build() {
cd $_pkgname

cmake . \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr
make
}

package() {
cd $_pkgname

make DESTDIR="$pkgdir" install
mkdir -p "$pkgdir/etc/udev/rules.d/"
cp mirisdr.rules "$pkgdir/etc/udev/rules.d/99-mirisdr.rules"
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From 308890fb664cfbf10a858035894a4f73b7cfa47e Mon Sep 17 00:00:00 2001
From: Xiretza <[email protected]>
Date: Sat, 24 Apr 2021 23:30:16 +0200
Subject: [PATCH] makefile: install udev rules to correct location

---
Makefile.am | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index d5ebce1..a41acdf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -69,14 +69,8 @@ dist_pkgdata_DATA = $(udev_DATA)
# sudo udevadm control --reload-rules
#
udevrule_DATA = $(top_srcdir)/95-perseus.rules
-udevruledir = $(bindir)
+udevruledir = $(libdir)/udev/rules.d/
EXTRA_DIST = $(top_srcdir)/95-perseus.rules README.Windows $(top_srcdir)/build-aux/git-version-gen fpga_data.c
-
-install-data-hook:
- -cp $(bindir)/95-perseus.rules /etc/udev/rules.d/ ; groupadd perseususb ; echo $(INST_USER) ;usermod -a -G perseususb $(INST_USER) ; udevadm control --reload-rules
-
-uninstall-hook:
- -rm /etc/udev/rules.d/95-perseus.rules ; groupdel perseususb ; udevadm control --reload-rules
endif

#
--
2.31.1
51 changes: 51 additions & 0 deletions packages/libperseus-sdr/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=libperseus-sdr
pkgver=v0.8.2.r3.gc2c95da
pkgrel=1
pkgdesc='Perseus Software Defined Radio Control Library for Linux.'
arch=('x86_64')
groups=('blackarch' 'blackarch-radio')
url='https://github.com/Microtelecom/libperseus-sdr'
license=('LGPL-3.0-or-later')
depends=('libusb')
makedepends=('git' 'vim')
provides=('libperseus-sdr.so')
source=("git+https://github.com/Microtelecom/$pkgname.git"
"0001-makefile-install-udev-rules-to-correct-location.patch")
sha512sums=('SKIP'
'2abc9cc1b291b4d32e37ef252d1e0dc0a970b0788cdecd2c7e523f5368c611532eb9329c5cf4679a6437293ecac682ad5abfe44d6aaa6e5a02806aa1ff15d778')
install="$pkgname.install"

pkgver() {
cd $pkgname

( set -o pipefail
git describe --long --tags --abbrev=7 2>/dev/null |
sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "%s.%s" "$(git rev-list --count HEAD)" \
"$(git rev-parse --short=7 HEAD)"
)
}

prepare() {
cd $pkgname

patch -p1 < "../0001-makefile-install-udev-rules-to-correct-location.patch"
}

build() {
cd $pkgname

autoreconf -i
./configure --prefix=/usr
make
}

package() {
cd $pkgname

make DESTDIR="$pkgdir" install
}

7 changes: 7 additions & 0 deletions packages/libperseus-sdr/libperseus-sdr.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
post_install() {
libtool --finish /usr/lib
}

post_upgrade() {
post_install "$@"
}
45 changes: 45 additions & 0 deletions packages/libusb3380/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=libusb3380
pkgver=16.92d102a
pkgrel=1
pkgdesc='USB3380 abstraction layer for libusb.'
arch=('x86_64' 'aarch64')
url='https://github.com/xtrx-sdr/libusb3380'
license=('Apache-2.0')
makedepends=('git' 'cmake')
source=("git+https://github.com/xtrx-sdr/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
cd $pkgname

( set -o pipefail
git describe --long --tags --abbrev=7 2>/dev/null |
sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "%s.%s" "$(git rev-list --count HEAD)" \
"$(git rev-parse --short=7 HEAD)"
)
}

build() {
cd $pkgname

mkdir -p build
cd build

cmake .. \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release

make
}

package() {
cd $pkgname

make -C build DESTDIR="$pkgdir" install
}

46 changes: 46 additions & 0 deletions packages/libxtrx/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=libxtrx
pkgver=78.d9599fb
pkgrel=1
pkgdesc='High level API for the xtrx SDR.'
arch=('x86_64' 'aarch64')
url='https://github.com/xtrx-sdr/libxtrx'
license=('Apache-2.0')
makedepends=('git' 'cmake')
depends=('liblms7002m-xtrx' 'libxtrxdsp' 'libxtrxll' 'qcustomplot' 'soapysdr')
source=("git+https://github.com/xtrx-sdr/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
cd $pkgname

( set -o pipefail
git describe --long --tags --abbrev=7 2>/dev/null |
sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "%s.%s" "$(git rev-list --count HEAD)" \
"$(git rev-parse --short=7 HEAD)"
)
}

build() {
cd $pkgname

mkdir -p build
cd build

cmake .. \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Debug

make
}

package() {
cd $pkgname

make -C build DESTDIR="$pkgdir" install
}

Loading

0 comments on commit 2497427

Please sign in to comment.