Skip to content

Instantly share code, notes, and snippets.

@Holzhaus
Created October 17, 2014 18:36
Show Gist options
  • Save Holzhaus/cf467ed668eeeeb2ec34 to your computer and use it in GitHub Desktop.
Save Holzhaus/cf467ed668eeeeb2ec34 to your computer and use it in GitHub Desktop.
RTL-SDR PKGBUILD
# By Jan Holthuis <holthuis.jan@googlemail.com>
pkgname=rtl-sdr-keenerd-git
pkgver=0.0.0
pkgrel=1
pkgdesc="Keenerd's RTL-SDR experimental branch"
arch=('i686' 'x86_64' 'armvh6')
url="https://github.com/keenerd/rtl-sdr"
license=('MIT')
depends=('libusb>=1.0')
makedepends=('git' 'cmake')
conflicts=('rtl-sdr' 'rtl-sdr-git')
provides=('rtl-sdr')
source=('git+https://github.com/keenerd/rtl-sdr.git')
md5sums=('SKIP')
_gitname="rtl-sdr"
pkgver() {
cd "$srcdir/$_gitname"
# Use the tag of the last commit
git describe --long | sed -E 's/([^-]*-g)/r\1/;s/-/./g'
}
build() {
cd "$srcdir/$_gitname"
mkdir build
cd build
cmake ../
make
}
package() {
cd "$srcdir/$_gitname/build"
make PREFIX=/usr DESTDIR="$pkgdir" install
}
# Run with:
# $ LD_LIBRARY_PATH=/usr/local/lib rtl_power --help
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment