diff options
author | Xiretza | 2020-04-06 16:03:01 +0200 |
---|---|---|
committer | Xiretza | 2020-04-06 16:03:01 +0200 |
commit | 41f159f8337bcca7710151a91da8f05c8ec0a477 (patch) | |
tree | 7fd1f2aefc4e2db2d9e3bc94b9c2ac416c0ff866 | |
download | aur-41f159f8337bcca7710151a91da8f05c8ec0a477.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 27 | ||||
-rw-r--r-- | 0001-Fix-build-failure-due-to-missing-QKeyEvent-header.patch | 28 | ||||
-rw-r--r-- | 0002-Honour-PREFIX-variable-for-installation.patch | 41 | ||||
-rw-r--r-- | PKGBUILD | 57 | ||||
-rw-r--r-- | lcsniff.desktop | 10 |
5 files changed, 163 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..0c8bb0a843b1 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,27 @@ +pkgbase = usb2sniffer-qt-git + pkgdesc = LambdaConcept lcsniff software for USB2Sniffer hardware + pkgver = r156.e5eb82c + pkgrel = 1 + url = https://github.com/lambdaconcept/usb2sniffer-qt + arch = x86_64 + license = GPL3 + makedepends = git + depends = qt5-base + provides = usb2sniffer-qt + provides = lcsniff + provides = lcsniff-git + conflicts = usb2sniffer-qt + conflicts = lcsniff + source = git+https://github.com/lambdaconcept/usb2sniffer-qt + source = git+https://github.com/Simsys/qhexedit2 + source = lcsniff.desktop + source = 0001-Fix-build-failure-due-to-missing-QKeyEvent-header.patch + source = 0002-Honour-PREFIX-variable-for-installation.patch + sha256sums = SKIP + sha256sums = SKIP + sha256sums = e5c124eb54c99e67cea9b8ffce278b40019f9b61de2e6a1081145680c1e7960e + sha256sums = 0bac7306cfaf7a5022de89c1c1f9ddaf6bbc5aa1c98402590dd1827fd318a7e0 + sha256sums = 593ae39285a8b556a1372e3eaa036fae0a2a99fc8ed83f141f0d7464ed34cc90 + +pkgname = usb2sniffer-qt-git + diff --git a/0001-Fix-build-failure-due-to-missing-QKeyEvent-header.patch b/0001-Fix-build-failure-due-to-missing-QKeyEvent-header.patch new file mode 100644 index 000000000000..e6a32650c3a5 --- /dev/null +++ b/0001-Fix-build-failure-due-to-missing-QKeyEvent-header.patch @@ -0,0 +1,28 @@ +From 6ed2361e492d69f368ea5afaed5cbc1119219d6e Mon Sep 17 00:00:00 2001 +From: Xiretza <xiretza@xiretza.xyz> +Date: Mon, 6 Apr 2020 14:43:58 +0200 +Subject: [PATCH] Fix build failure due to missing QKeyEvent header +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Build failed with "invalid static_cast from type ‘QEvent*’ to type ‘QKeyEvent*’" +in src/mainwindow.cpp:429, including the header fixes that. +--- + src/mainwindow.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp +index e96bb0d..e558601 100644 +--- a/src/mainwindow.cpp ++++ b/src/mainwindow.cpp +@@ -1,5 +1,6 @@ + #include <QFileDialog> + #include <QMessageBox> ++#include <QKeyEvent> + + #include "pcapexport.h" + #include "mainwindow.h" +-- +2.26.0 + diff --git a/0002-Honour-PREFIX-variable-for-installation.patch b/0002-Honour-PREFIX-variable-for-installation.patch new file mode 100644 index 000000000000..c8322166c8a9 --- /dev/null +++ b/0002-Honour-PREFIX-variable-for-installation.patch @@ -0,0 +1,41 @@ +From 185326ad7a13ac1bd89e872f68546ae33e32a70b Mon Sep 17 00:00:00 2001 +From: Xiretza <xiretza@xiretza.xyz> +Date: Mon, 6 Apr 2020 15:31:25 +0200 +Subject: [PATCH] Honour PREFIX variable for installation + +--- + lcsniff.pro | 18 +++++++++++++++--- + 1 file changed, 15 insertions(+), 3 deletions(-) + +diff --git a/lcsniff.pro b/lcsniff.pro +index 87f9ea4..307abbf 100644 +--- a/lcsniff.pro ++++ b/lcsniff.pro +@@ -90,9 +90,21 @@ FORMS += \ + ui/aboutwindow.ui + + # Default rules for deployment. +-qnx: target.path = /tmp/$${TARGET}/bin +-else: unix:!android: target.path = /opt/$${TARGET}/bin +-!isEmpty(target.path): INSTALLS += target ++# Attempt to set the PREFIX variable from one of these sources: ++# 1. PREFIX qmake variable (i.e. leave it as-is) ++# 2. PREFIX environment variable ++# 3. Platform-specific defaults ++isEmpty(PREFIX) { ++ ENV_PREFIX = $$(PREFIX) ++ !isEmpty(ENV_PREFIX): PREFIX = $$ENV_PREFIX ++ else:qnx: PREFIX = /tmp/$${TARGET} ++ else:unix:!android: PREFIX = /opt/$${TARGET} ++} ++ ++!isEmpty(PREFIX) { ++ target.path = $$PREFIX/bin ++ INSTALLS += target ++} + + RESOURCES += \ + resources.qrc +-- +2.26.0 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..608ead9fe9a1 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,57 @@ +# Maintainer: xiretza <xiretza+aur@gmail.com> +pkgname=usb2sniffer-qt-git +_pkgname=usb2sniffer-qt +pkgver=r156.e5eb82c +pkgrel=1 +pkgdesc="LambdaConcept lcsniff software for USB2Sniffer hardware" +arch=(x86_64) +url="https://github.com/lambdaconcept/usb2sniffer-qt" +license=('GPL3') +depends=('qt5-base') +makedepends=('git') +provides=('usb2sniffer-qt' 'lcsniff' 'lcsniff-git') +conflicts=('usb2sniffer-qt' 'lcsniff') +source=("git+https://github.com/lambdaconcept/usb2sniffer-qt" + "git+https://github.com/Simsys/qhexedit2" + "lcsniff.desktop" + "0001-Fix-build-failure-due-to-missing-QKeyEvent-header.patch" + "0002-Honour-PREFIX-variable-for-installation.patch") +sha256sums=('SKIP' + 'SKIP' + 'e5c124eb54c99e67cea9b8ffce278b40019f9b61de2e6a1081145680c1e7960e' + '0bac7306cfaf7a5022de89c1c1f9ddaf6bbc5aa1c98402590dd1827fd318a7e0' + '593ae39285a8b556a1372e3eaa036fae0a2a99fc8ed83f141f0d7464ed34cc90') + +pkgver() { + cd "$_pkgname" + + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cd "$_pkgname" + + patch -p1 < "$srcdir/0001-Fix-build-failure-due-to-missing-QKeyEvent-header.patch" + patch -p1 < "$srcdir/0002-Honour-PREFIX-variable-for-installation.patch" + + git submodule init + git config submodule.qhexedit2.url "$srcdir/qhexedit2" + git submodule update + mkdir build +} + +build() { + cd "$_pkgname/build" + + qmake QMAKE_STRIP=: PREFIX="/usr" ../lcsniff.pro + make +} + +package() { + cd "$_pkgname/build" + make INSTALL_ROOT="$pkgdir" install + + cd "$srcdir" + install -Dm644 "$_pkgname/icons/logo-alpha-small.png" "$pkgdir/usr/share/pixmaps/lcsniff.png" + install -Dm644 "$srcdir/lcsniff.desktop" "$pkgdir/usr/share/applications/lcsniff.desktop" +} diff --git a/lcsniff.desktop b/lcsniff.desktop new file mode 100644 index 000000000000..6b54e4c3eb7b --- /dev/null +++ b/lcsniff.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=LCSniff +Comment=LambdaConcept lcsniff software for USB2Sniffer hardware +Exec=lcsniff +Icon=lcsniff +Terminal=false +StartupNotify=false +Categories=Application; |