summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorroot2022-02-05 17:58:55 +0100
committerroot2022-02-05 17:58:55 +0100
commit555a5e58ee9e51f2a276c97abbed3730a99d9d14 (patch)
treebbc9cd28232dfec08739bbbfc0740d4ea3f1bda8
downloadaur-555a5e58ee9e51f2a276c97abbed3730a99d9d14.tar.gz
Initial commit.
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD58
-rw-r--r--license-dummy.txt1
-rw-r--r--nokiatool-archpackage.patch15
4 files changed, 93 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..533251a72863
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = nokiatool-mtk
+ pkgdesc = Simple interface Bash script to control MediaTek-based Nokia simple phones. !! Read README.md before usage. !!
+ pkgver = 20191120T132638
+ pkgrel = 1
+ url = https://gist.github.com/plugnburn/5b2582be521944f739e1
+ arch = any
+ license = custom: unknown.
+ makedepends = curl
+ depends = bash
+ source = nokiatool.sh::https://gist.github.com/plugnburn/5b2582be521944f739e1/raw/nokiatool.sh
+ source = README.md::https://gist.github.com/plugnburn/5b2582be521944f739e1/raw/README.md
+ source = nokiatool-archpackage.patch
+ source = license-dummy.txt
+ sha256sums = a6f628c0a9da2d62c08aa6450326879931eafd7a9fc9ea38d14c3dae59fbe644
+ sha256sums = dbdc81409df13c60ae404c8d0e90d1f15b7f62c56c5bb715145d377fd08858ba
+ sha256sums = 3e780ccc3c36bb27b2336b5a516d5f59c0ea3715a1651485009326b987a47435
+ sha256sums = 340b8388afef3de4eb536574d6a43afd91e3576bd1faa77d7b6c95e0dbe43bf6
+
+pkgname = nokiatool-mtk
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..cba810c9b25f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: dreieck
+
+_pkgname=nokiatool-mtk
+pkgname="${_pkgname}"
+pkgver=20191120T132638
+pkgrel=1
+pkgdesc='Simple interface Bash script to control MediaTek-based Nokia simple phones. !! Read README.md before usage. !!'
+arch=('any')
+url="https://gist.github.com/plugnburn/5b2582be521944f739e1"
+license=('custom: unknown.')
+depends=(
+ 'bash'
+)
+makedepends=(
+ 'curl'
+)
+optdepends=()
+provides=()
+conflicts=()
+replaces=()
+source=(
+ "nokiatool.sh::${url}/raw/nokiatool.sh"
+ "README.md::${url}/raw/README.md"
+ "nokiatool-archpackage.patch"
+ "license-dummy.txt"
+)
+sha256sums=(
+ 'a6f628c0a9da2d62c08aa6450326879931eafd7a9fc9ea38d14c3dae59fbe644'
+ 'dbdc81409df13c60ae404c8d0e90d1f15b7f62c56c5bb715145d377fd08858ba'
+ '3e780ccc3c36bb27b2336b5a516d5f59c0ea3715a1651485009326b987a47435'
+ '340b8388afef3de4eb536574d6a43afd91e3576bd1faa77d7b6c95e0dbe43bf6'
+)
+
+prepare() {
+ if [ -d "${srcdir}/build" ]; then
+ rm -f "${srcdir}/build"/*
+ rmdir "${srcdir}/build"
+ fi
+ mkdir "${srcdir}/build"
+}
+
+pkgver() {
+ curl -s "${url}/revisions" | grep -F -m 1 'this gist <relative-time' | sed -E 's|^.*<relative-time.+datetime="([^"]*)".*$|\1|' | tr -d '\-:Z'
+}
+
+build() {
+ patch -N --follow-symlinks -i "${srcdir}/nokiatool-archpackage.patch" -o "${srcdir}/build/nokiatool.sh" "${srcdir}/nokiatool.sh"
+}
+
+package() {
+ install -D -v -m755 "${srcdir}/build/nokiatool.sh" "${pkgdir}/usr/bin/nokiatool-mtk"
+
+ for _docfile in "${srcdir}/README.md"; do
+ install -D -v -m644 "${_docfile}" "${pkgdir}/usr/share/doc/${_pkgname}/${_docfile}"
+ done
+
+ install -D -v -m644 "${srcdir}/license-dummy.txt" "${pkgdir}/usr/share/licenses/${pkgname}/license-dummy.txt"
+}
diff --git a/license-dummy.txt b/license-dummy.txt
new file mode 100644
index 000000000000..33f21311e6da
--- /dev/null
+++ b/license-dummy.txt
@@ -0,0 +1 @@
+No license text came with this software. Assume all copyright to the authors, (c) Suborg 2016, https://gist.github.com/plugnburn/5b2582be521944f739e1.
diff --git a/nokiatool-archpackage.patch b/nokiatool-archpackage.patch
new file mode 100644
index 000000000000..90a9a019060c
--- /dev/null
+++ b/nokiatool-archpackage.patch
@@ -0,0 +1,15 @@
+--- nokiatool.sh.org 2022-02-05 17:07:46.889322592 +0100
++++ nokiatool.sh.new 2022-02-05 17:35:20.669270861 +0100
+@@ -6,2 +6,4 @@
+-MODEM='/dev/ttyUSB1' # Nokia opens two serial ports, we need the second one to send control commands
+-DRIVERINIT='modprobe usbserial vendor=0x0421 product=0x069a' # init Nokia usb2serial driver (not needed for some models if they are autodetected)
++if [ -z "${MODEM}" ]; then # The serial port to be used can be controlled by the command line; if not set, use a default:
++ read -e -i '/dev/ttyUSB1' -p 'Specify device to interact with (e.g. /dev/ttyUSB1): ' MODEM # Nokia opens two serial ports, we usually need the second one to send control commands
++fi
++# For not auto-recognised devices something like a manual `modprobe usbserial vendor=0x0421 product=0x069a` might be needed beforehand.
+@@ -505 +507 @@
+- $DRIVERINIT
++ # "${DRIVERINIT[@]}" # Here some initialisation commands could be placed.
+@@ -527 +529 @@
+- sudo bash -c "$CURSCRIPT $ARGS"
++ bash -c "$CURSCRIPT $ARGS"