summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD23
2 files changed, 18 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 372cf178dbaa..86b780f9fa52 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,14 @@
pkgbase = whsniff
pkgdesc = A command line utility that interfaces TI CC2531 USB dongle with Wireshark for capturing and displaying IEEE 802.15.4 traffic at 2.4 GHz.
- pkgver = 1.1
+ pkgver = 1.1.r10.920e107
pkgrel = 1
- url = https://github.com/homewsn/whsniff
+ url = https://github.com/homewsn/whsniff.git
arch = x86_64
license = GPL
makedepends = sed
depends = libusb
- source = https://github.com/homewsn/whsniff/archive/v1.1.tar.gz
- sha256sums = 5d8be9dbdb572e0d05c33e8cb613ebdb31e939a032e350aff4151e83def8ad2e
+ source = whsniff::git+https://github.com/homewsn/whsniff.git
+ sha256sums = SKIP
pkgname = whsniff
diff --git a/PKGBUILD b/PKGBUILD
index ec6e6dbc2b92..2e67490be33d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,31 +1,36 @@
# Maintainer: Alex Mekkering <amekkering at gmail dot com>
pkgname=whsniff
-pkgver=1.1
+_pkgver=1.1
+pkgver=1.1.r10.920e107
pkgrel=1
pkgdesc="A command line utility that interfaces TI CC2531 USB dongle with Wireshark for capturing and displaying IEEE 802.15.4 traffic at 2.4 GHz."
arch=('x86_64')
-url='https://github.com/homewsn/whsniff'
+url='https://github.com/homewsn/whsniff.git'
license=('GPL')
depends=('libusb')
makedepends=('sed')
-source=( "https://github.com/homewsn/whsniff/archive/v${pkgver}.tar.gz" )
-sha256sums=('5d8be9dbdb572e0d05c33e8cb613ebdb31e939a032e350aff4151e83def8ad2e')
+source=( "${pkgname}::git+https://github.com/homewsn/whsniff.git" )
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "${srcdir}/${pkgname}"
+ printf "${_pkgver}.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
prepare() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd "${srcdir}/${pkgname}"
- # patch sources
+ # patch Makefile
sed -i "s:PREFIX = /usr/local:PREFIX = ${pkgdir}:g" Makefile
- sed -i 's:libusb_set_debug(NULL:libusb_set_option(NULL, LIBUSB_OPTION_LOG_LEVEL:g' src/whsniff.c
}
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd "${srcdir}/${pkgname}"
make
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd "${srcdir}/${pkgname}"
make install
}