diff --git a/common/shlibs b/common/shlibs index 5eecf374cf..91c1282ba3 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2913,3 +2913,4 @@ libgpod.so.4 libgpod-0.8.3_1 libi2c.so.0 i2c-tools-4.0_1 libairspy.so.0 libairspy-1.0.9_1 libfswatch.so.9 fswatch-1.11.2_1 +libhackrf.so.0 libhackrf-2017.02.1_1 diff --git a/srcpkgs/hackrf/template b/srcpkgs/hackrf/template new file mode 100644 index 0000000000..89dc3ed722 --- /dev/null +++ b/srcpkgs/hackrf/template @@ -0,0 +1,44 @@ +# Template file for 'hackrf' +pkgname=hackrf +version=2017.02.1 +revision=1 +build_wrksrc=host +build_style=cmake +hostmakedepends="pkg-config" +makedepends="libusb-devel fftw-devel" +_desc="Low cost software defined radio (SDR) platform" +short_desc="${_desc} - tools" +maintainer="bra1nwave " +license="GPL-2" +homepage="https://greatscottgadgets.com/hackrf/" +distfiles="https://github.com/mossmann/hackrf/releases/download/v${version}/${pkgname}-${version}.tar.xz" +checksum=1dd1fbec98bf2fa56c92f82fd66eb46801a2248c019c4707b3971bc187cb973a + +pre_configure() { + sed -i 's|MODE="660", GROUP="plugdev"|TAG+="uaccess"|g' libhackrf/53-hackrf.rules +} + +post_install() { + for f in ../firmware-bin/*.{bin,dfu,xsvf}; do + vinstall "$f" 644 usr/share/hackrf/ + done +} + +libhackrf_package() { + short_desc="${_desc} - library" + pkg_install() { + vmove usr/lib/*.so.* + vinstall libhackrf/53-hackrf.rules 644 usr/lib/udev/rules.d/ + } +} + +libhackrf-devel_package() { + short_desc="${_desc} - development files" + depends="libhackrf>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove usr/lib/*.a + vmove usr/lib/*.so + vmove usr/lib/pkgconfig + } +} diff --git a/srcpkgs/libhackrf b/srcpkgs/libhackrf new file mode 120000 index 0000000000..2cd67bb200 --- /dev/null +++ b/srcpkgs/libhackrf @@ -0,0 +1 @@ +hackrf \ No newline at end of file diff --git a/srcpkgs/libhackrf-devel b/srcpkgs/libhackrf-devel new file mode 120000 index 0000000000..2cd67bb200 --- /dev/null +++ b/srcpkgs/libhackrf-devel @@ -0,0 +1 @@ +hackrf \ No newline at end of file