makedeb


nrsc5-git 1.0+186+gb969965-1


NRSC-5 (HD Radio) receiver for rtl-sdr

Viewing /PKGBUILD.

View raw.

Click here to go back to the Git tree for nrsc5-git.

# Maintainer: John Ruschmeyer <jruschme@gmail.com>
# Contributor: Ryan Farley <ryan.farley@gmx.com>

pkgname=nrsc5-git 
pkgver=1.0+186+gb969965
pkgrel=1
pkgdesc="NRSC-5 (HD Radio) receiver for rtl-sdr"
arch=('i386' 'amd64' 'armv7h')
url="https://github.com/theori-io/nrsc5"
license=('GPL')
depends=('rtl-sdr' 'fftw2' 'libao4' 'libusb-1.0-0')
makedepends=('git' 'cmake' 'fftw-dev' 'libao-dev' 'libusb-1.0-0-dev' 'librtlsdr-dev') 
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")

#use this for experimental branch
#source=('nrsc5::git+https://github.com/theori-io/nrsc5.git#branch=experimental')
#or this for the master branch 
source=('nrsc5::git+https://github.com/theori-io/nrsc5.git#branch=master')
md5sums=('SKIP')


pkgver() {
	cd "../${pkgname%-git}"
	git fetch --unshallow || git fetch --all
  	#printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
	git describe --long --tags | sed 's/v//; s/-/+/g'
}


build() {
	cd "${pkgname%-git}"
	
	#CPU optimizations
	if $(grep -q 'sse3' -i /proc/cpuinfo); then
		_sse3="ON"
	else
		_sse3="OFF"
	fi
	if $(grep -q 'neon' -i /proc/cpuinfo); then
		_neon="ON"
	else
		_neon="OFF"
	fi

	cmake -DCMAKE_INSTALL_PREFIX=/usr -DUSE_NEON="${_neon}" -DUSE_SSE="${_sse3}" .
	make
}


package() {
	cd "$srcdir/${pkgname%-git}"
	make DESTDIR="$pkgdir/" install
}