summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD60
1 files changed, 60 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..70a972f7579
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,60 @@
+# Maintainer: Marat Moustafine <moustafine-@t-tuta-d.t-io>
+
+_pkgname=qtools
+pkgname=$_pkgname-git
+pkgver=latest
+pkgrel=1
+pkgdesc='A toolset for reading/writing flash of Qualcomm chips'
+arch=('i686' 'x86_64')
+url=https://github.com/forth32/$_pkgname
+license=('LGPL3')
+depends=('readline')
+makedepends=('git')
+provides=($_pkgname)
+conflicts=($_pkgname)
+backup=(etc/$_pkgname/chipset.cfg)
+source=(git+$url.git
+ chipconfig.patch)
+sha256sums=('SKIP'
+ '618abb9acc929cdab9964a49254681bca07ffab088e283936501bfcdb5a881e4')
+
+pkgver() {
+ cd $_pkgname
+ (
+ set -o pipefail
+ git describe --long --tags 2> /dev/null | sed -r 's/^[r|v]//;s/-/+/g' ||
+ printf '%s+%s' $(git rev-list --count HEAD) $(git rev-parse --short HEAD)
+ )
+}
+
+prepare() {
+ cd $_pkgname
+ patch -N -p 1 -i ../chipconfig.patch
+}
+
+build () {
+ cd $_pkgname
+ make all
+}
+
+package() {
+ cd $_pkgname
+ install -D -m 755 -t $pkgdir/usr/bin \
+ mibibsplit \
+ qbadblock \
+ qblinfo \
+ qcommand \
+ qdload \
+ qefs \
+ qflashparm \
+ qident \
+ qnvram \
+ qrflash \
+ qrmem \
+ qterminal \
+ qwdirect \
+ qwflash
+ install -D -m 644 -t $pkgdir/usr/lib/$_pkgname/loaders loaders/*.bin
+ install -D -m 644 -t $pkgdir/usr/share/doc/$_pkgname doc/*.odt
+ install -D -m 644 -t $pkgdir/etc/$_pkgname chipset.cfg
+}