Created
July 17, 2017 07:45
-
-
Save tonylambiris/640c02124f467cc7a95f0811bf1a9c44 to your computer and use it in GitHub Desktop.
Updated PKGBUILD for rtlsdr-scanner-git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Michal Krenek (Mikos) <m.krenek@gmail.com> | |
pkgname=rtlsdr-scanner-git | |
pkgver=r1001.8621d8b | |
pkgrel=1 | |
pkgdesc="Python frequency scanning GUI for the OsmoSDR rtl-sdr library" | |
arch=('i686' 'x86_64') | |
url="http://eartoearoak.com/software/rtlsdr-scanner" | |
license=('GPL3') | |
depends=('rtl-sdr' 'wxpython' 'python2-pyrtlsdr-git' 'python2-matplotlib' 'python2-numpy' 'python2-pillow' 'python2-pyserial') | |
makedepends=('git') | |
optdepends=('python2-visvis: better and faster real-time plotting') | |
provides=("${pkgname%-git}") | |
conflicts=("${pkgname%-git}") | |
source=('rtlsdr-scanner::git+https://github.com/EarToEarOak/RTLSDR-Scanner.git') | |
sha256sums=('SKIP') | |
pkgver() { | |
cd "$srcdir/${pkgname%-git}" | |
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" | |
} | |
prepare() { | |
cd "$srcdir/${pkgname%-git}" | |
sed -i -r \ | |
-e "s|^Exec = .*|Exec = /usr/bin/rtlsdr_scan|g" \ | |
-e '/^Exec.*/ s|$|\nIcon = /usr/share/rtlsdr-scanner/rtlsdr_scan.ico|g' \ | |
rtlsdr-scanner.desktop | |
} | |
build() { | |
cd "$srcdir/${pkgname%-git}" | |
python2 setup.py build | |
} | |
package() { | |
cd "$srcdir/${pkgname%-git}" | |
python2 setup.py install --root="${pkgdir}" | |
install -d "${pkgdir}/usr/bin" \ | |
"${pkgdir}/usr/share/applications" \ | |
"${pkgdir}/usr/share/rtlsdr-scanner" | |
install -Dm644 rtlsdr-scanner.desktop \ | |
"${pkgdir}/usr/share/applications" | |
install -Dm644 nsis/rtlsdr_scan.ico \ | |
"${pkgdir}/usr/share/rtlsdr-scanner" | |
cat > "${pkgdir}/usr/bin/rtlsdr_scan" <<EOT | |
#!/bin/sh | |
python2 -m rtlsdr_scanner "\$@" | |
EOT | |
chmod +x "${pkgdir}/usr/bin/rtlsdr_scan" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment