summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3948a40311b34f7e462c8e79cbd74723a3109527 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Maintainer: Ryan Farley <ryan.farley@gmx.com>
pkgname=nrsc5-git 
pkgver=r233.6c64409
pkgrel=2
pkgdesc="NRSC-5 (HD Radio) receiver for rtl-sdr"
arch=('i686' 'x86_64' 'armv7h')
url="https://github.com/theori-io/nrsc5"
license=('GPL')
depends=('rtl-sdr' 'fftw' 'libao')
makedepends=('git' 'cmake') 
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 "$srcdir/${pkgname%-git}"
  	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}


build() {
	cd "$srcdir/${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
}