summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO9
-rw-r--r--.gitignore4
-rw-r--r--[-rwxr-xr-x]PKGBUILD34
3 files changed, 24 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b6ac68503a0d..8f6c731129c9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,14 @@
pkgbase = rtlamr
pkgdesc = An rtl-sdr receiver for Itron ERT compatible smart meters operating in the 900MHz ISM band.
pkgver = 0.9.3
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/bemasher/rtlamr
- arch = any
+ arch = i686
+ arch = x86_64
license = AGPL3
makedepends = go
depends = rtl-sdr
- options = !strip
- options = !emptydirs
source = https://github.com/bemasher/rtlamr/archive/v0.9.3.tar.gz
- md5sums = eaf1d3de2284bc672c76eca5cef47ed4
+ sha256sums = 544f50826f874cc436a0b9cf3d72a6c298ddb308d4ea5f088dad233c5d319fc1
pkgname = rtlamr
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..a790faa9ca43
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/pkg/
+/src/
+/*.pkg.*
+/*.gz
diff --git a/PKGBUILD b/PKGBUILD
index dfccef54a622..324ec134078c 100755..100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,42 +3,40 @@
pkgname=rtlamr
pkgver=0.9.3
-pkgrel=2
+pkgrel=3
pkgdesc="An rtl-sdr receiver for Itron ERT compatible smart meters operating in the 900MHz ISM band."
-arch=('any')
+arch=('i686' 'x86_64')
url="https://github.com/bemasher/rtlamr"
-source=("https://github.com/bemasher/rtlamr/archive/v${pkgver}.tar.gz")
-md5sums=('eaf1d3de2284bc672c76eca5cef47ed4')
license=('AGPL3')
depends=('rtl-sdr')
makedepends=('go')
-options=('!strip' '!emptydirs')
-_gourl=github.com/bemasher/rtlamr
+source=("https://github.com/bemasher/rtlamr/archive/v${pkgver}.tar.gz")
+sha256sums=('544f50826f874cc436a0b9cf3d72a6c298ddb308d4ea5f088dad233c5d319fc1')
prepare(){
- mkdir -p gopath/src/${_gourl%/*}
- ln -rTsf $pkgname-$pkgver gopath/src/$_gourl
+ cd "$pkgname-$pkgver"
+ mkdir -p build
}
build() {
- export GOPATH="$srcdir"/gopath
- cd gopath/src/$_gourl
- go install \
- -trimpath \
- -modcacherw \
- -ldflags "-extldflags $LDFLAGS" \
- -v ./...
+ cd "$pkgname-$pkgver"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+ go build -o build .
}
check() {
- export GOPATH="$srcdir"/gopath
- cd gopath/src/$_gourl
+ cd "$pkgname-$pkgver"
go test ./...
}
package() {
- install -p -Dm755 gopath/bin/rtlamr "$pkgdir/usr/bin/rtlamr"
+ cd "$pkgname-$pkgver"
+ install -p -Dm755 build/$pkgname "$pkgdir"/usr/bin/$pkgname
}
# vim:set ts=2 sw=2 et: