# Template file for 'gnuradio'
pkgname=gnuradio
version=3.8.0.0
revision=9
build_style=cmake
conf_files="/etc/gnuradio/conf.d/*"
configure_args="-DENABLE_INTERNAL_VOLK=OFF -DGR_PYTHON_DIR=/${py3_sitelib}"
hostmakedepends="pkg-config doxygen swig python3-Mako python3-Sphinx
 python3-cairo python3-numpy python3-yaml texlive texlive-latexextra texlive-dvi"
makedepends="SDL-devel boost-devel fftw-devel gsl-devel jack-devel
 libgsm-devel libusb-devel volk-devel uhd-devel gtk+3-devel python3-devel
 python3-gobject-devel log4cpp-devel gmpxx-devel mpir-devel"
depends="python3-cheetah3 python3-numpy python3-Mako python3-gobject
 python3-yaml"
checkdepends="python3-scipy"
short_desc="Framework for software defined radio"
maintainer="Andrew Benson <abenson+void@gmail.com>"
license="GPL-3.0-or-later"
homepage="https://www.gnuradio.org"
distfiles="https://github.com/gnuradio/gnuradio/archive/v${version}.tar.gz"
checksum=03fd01f0b27033befb91709b3d56f95e0869b5fb8bc71bec2662266a3f0dedf5
python_version=3

post_install() {
	rm ${DESTDIR}/usr/share/gnuradio/examples/audio/dial_tone \
		${DESTDIR}/usr/share/gnuradio/examples/uhd/tags_demo
	vinstall grc/scripts/freedesktop/gnuradio-grc.desktop 644 \
		usr/share/applications
	vinstall grc/scripts/freedesktop/gnuradio_logo_icon-square.svg 644 \
		usr/share/pixmaps gnuradio-grc.svg
}

gnuradio-doc_package() {
	short_desc+=" - documentation"
	pkg_install() {
		vmove usr/share/doc
	}
}

gnuradio-devel_package() {
	short_desc+=" - development files"
	depends="${sourcepkg}>=${version}_${revision}"
	pkg_install() {
		vmove usr/include
		vmove "usr/lib/*.so"
		vmove usr/lib/cmake
		vmove usr/lib/pkgconfig
	}
}
