sdl-sdr, add recipe (#8966)

This commit is contained in:
Schrijvers Luc
2023-07-05 09:35:38 +02:00
committed by GitHub
parent fd50882a75
commit 11c902a63e

View File

@@ -0,0 +1,102 @@
SUMMARY="Turns your Realtek RTL2832 based DVB dongle into a SDR receiver"
DESCRIPTION="Experimental R820T/R820T2 rtl-sdr tuner driver that tunes down to 13 MHz or lower. \
(From my experiments up to 3.4 MHz on R820T2)
* 2017-2018: Transferring/Backporting new features from new versions and fixes...
* 2021: Project is now using only cmake build system.
* Integrated RTL_NFC code from https://github.com/Iskuri/RTLSDR-NFC
* 2022-2023: more fixes, add's, and improvements."
HOMEPAGE="https://osmocom.org/projects/rtl-sdr/wiki/Rtl-sdr"
COPYRIGHT="2017-2023 Steve Markgraf, Dimitri Stolnikov, Hoernchen et all"
LICENSE="GNU GPL v2"
REVISION="1"
srcGitRev="bd4637108b005e40b06651afd20e66861ad7f95b"
SOURCE_URI="https://github.com/Mr-Precise/rtl-sdr/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="b0878c9eecd80e2753ff661f44a2031b48a97f26b217a57d227a5fa2aa343589"
SOURCE_DIR="rtl-sdr-$srcGitRev"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
commandBinDir=$binDir
commandSuffix=$secondaryArchSuffix
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
libVersion=`echo $portVersion | sed 's/\_/./g'`
libVersionCompat="$libVersion compat >= 0"
PROVIDES="
rtl_sdr$secondaryArchSuffix = $portVersion
cmd:rtl_adsb$commandSuffix = $portVersion
cmd:rtl_biast$commandSuffix = $portVersion
cmd:rtl_eeprom$commandSuffix = $portVersion
cmd:rtl_fm$commandSuffix = $portVersion
cmd:rtl_ir$commandSuffix = $portVersion
cmd:rtl_nfc$commandSuffix = $portVersion
cmd:rtl_power$commandSuffix = $portVersion
cmd:rtl_sdr$commandSuffix = $portVersion
cmd:rtl_tcp$commandSuffix = $portVersion
cmd:rtl_test$commandSuffix = $portVersion
lib:librtlsdr$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libusb_1.0$secondaryArchSuffix
"
PROVIDES_devel="
rtl_sdr${secondaryArchSuffix}_devel = $portVersion
devel:librtlsdr$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
rtl_sdr$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libusb_1.0$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
defineDebugInfoPackage rtl_sdr$secondaryArchSuffix \
$libDir/librtlsdr.so.$libVersion \
$commandBinDir/rtl_adsb \
$commandBinDir/rtl_biast \
$commandBinDir/rtl_eeprom \
$commandBinDir/rtl_fm \
$commandBinDir/rtl_ir \
$commandBinDir/rtl_nfc \
$commandBinDir/rtl_power \
$commandBinDir/rtl_sdr \
$commandBinDir/rtl_tcp \
$commandBinDir/rtl_test
BUILD()
{
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs \
-DDETACH_KERNEL_DRIVER=ON \
-DCMAKE_INSTALL_BINDIR=$commandBinDir \
-DINSTALL_STATIC_LIB=NO
make -C build
}
INSTALL()
{
make -C build install
prepareInstalledDevelLib librtlsdr
fixPkgconfig
packageEntries devel \
$developDir \
$libDir/cmake
}