summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO20
-rw-r--r--CMakeLists.patch16
-rw-r--r--PKGBUILD58
3 files changed, 94 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..839e6dfb53e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = charge-guru
+ pkgdesc = Application to control SkyRC B6* chargers
+ pkgver = r8.38563a9
+ pkgrel = 1
+ url = https://github.com/maciek134/charge-guru
+ arch = x86_64
+ license = GPL3
+ makedepends = git
+ makedepends = cmake
+ makedepends = libb6
+ makedepends = gendesk
+ depends = qt5-base
+ depends = qt5-charts
+ optdepends = adwaita-icon-theme: battery icon
+ source = git+https://github.com/maciek134/charge-guru.git#commit=38563a9
+ source = CMakeLists.patch
+ sha256sums = SKIP
+ sha256sums = 54f8609c7d6a187845e83f85edf8dc4e38f8bb832cba2402ddb65580d0e3ac1b
+
+pkgname = charge-guru
diff --git a/CMakeLists.patch b/CMakeLists.patch
new file mode 100644
index 00000000000..ac4bfae9062
--- /dev/null
+++ b/CMakeLists.patch
@@ -0,0 +1,16 @@
+--- CMakeLists.txt 2021-10-30 15:30:08.340985000 +0200
++++ CMakeLists.txt 2021-10-30 15:31:03.176972991 +0200
+@@ -24,11 +24,10 @@
+ add_executable(ChargeGuru ${SOURCES})
+ qt5_use_modules(ChargeGuru Core Gui Widgets Charts)
+
++target_link_libraries(ChargeGuru b6)
++
+ find_package(libusb-1.0)
+ if (LIBUSB_1_FOUND)
+ include_directories(${LIBUSB_1_INCLUDE_DIRS})
+ target_link_libraries(ChargeGuru ${LIBUSB_1_LIBRARIES})
+ endif(LIBUSB_1_FOUND)
+-
+-target_link_libraries(ChargeGuru b6)
+-
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..c860ae61d3e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: swearchnick <swearchnick[at]gmail[dot]com>
+pkgname=charge-guru
+pkgver=r8.38563a9
+pkgrel=1
+pkgdesc="Application to control SkyRC B6* chargers"
+arch=('x86_64')
+url="https://github.com/maciek134/charge-guru"
+license=('GPL3')
+depends=('qt5-base' 'qt5-charts')
+makedepends=('git' 'cmake' 'libb6' 'gendesk')
+optdepends=('adwaita-icon-theme: battery icon')
+source=("git+https://github.com/maciek134/charge-guru.git#commit=38563a9" "CMakeLists.patch")
+sha256sums=('SKIP'
+ '54f8609c7d6a187845e83f85edf8dc4e38f8bb832cba2402ddb65580d0e3ac1b')
+
+prepare () {
+
+ cd "$srcdir/$pkgname"
+ patch -i "${srcdir}/CMakeLists.patch"
+
+}
+
+pkgver() {
+
+ cd "$pkgname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+
+}
+
+build() {
+
+ cd "$srcdir/$pkgname"
+ cmake -DCMAKE_INSTALL_PREFIX="$pkgdir/usr" -DCMAKE_BUILD_TYPE=Release
+ make
+
+}
+
+package() {
+
+ mkdir -p "$pkgdir/usr/bin"
+ install -Dm755 "$srcdir/$pkgname/ChargeGuru" "$pkgdir/usr/bin/$pkgname"
+
+ mkdir -p "$pkgdir/usr/lib/udev/rules.d"
+ echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="0000", ATTRS{idProduct}=="0001", MODE:="666"' > "$pkgdir/usr/lib/udev/rules.d/65-$pkgname.rules"
+ echo 'KERNEL=="hidraw*", ATTRS{idVendor}=="0000", ATTRS{idProduct}=="0001", MODE="0666"' >> "$pkgdir/usr/lib/udev/rules.d/65-$pkgname.rules"
+
+ gendesk -n -f \
+ --pkgname="${pkgname}" \
+ --pkgdesc="${pkgdesc}" \
+ --name="ChargeGuru" \
+ --categories="Utility" \
+ --startupnotify=true \
+ --icon=battery \
+ --comment="$pkgdesc"
+
+ install -Dm644 "$srcdir/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
+
+}