summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a180e2b3be9a3d213c9b932dac160c320b0c9469 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Maintainer: ArcanusNEO <admin@transcliff.eu.org>
# Contributor: Daniel Urdiales <daniurdi46@gmail.com>
# Copyright (C) 2019 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the CC0 1.0 License.

pkgname=qdl-git
_pkgname=qdl
pkgver=r185.2204f90
pkgrel=1
pkgdesc="Tool to communicate with Qualcomm System On a Chip bootroms to install or execute code"
arch=('i686' 'x86_64' 'armv6h' 'armv7l' 'aarch64')
url='https://github.com/linux-msm/qdl'
license=('BSD3')
makedepends=('git')
depends=('libxml2' 'libusb' 'systemd-libs')
provides=("qdl")
conflicts=("qdl")
source=("git+${url}.git")
b2sums=('SKIP')

pkgver() {
  cd "$srcdir/$_pkgname"
  printf "r%s.%s" $(git rev-list --count HEAD) $(git rev-parse --short HEAD)
}

build() {
  cd "$srcdir/$_pkgname"
  make CFLAGS:="${CFLAGS} -I/usr/include/libxml2 -I/usr/include/libusb-1.0" LDFLAGS:="${LDFLAGS} -lxml2 -lusb-1.0"
}

check() {
  cd "$srcdir/$_pkgname"
  make tests
}

package() {
  cd "$srcdir/$_pkgname"
  make prefix:="/usr" DESTDIR:="$pkgdir" install

  # Package license
  install -d "$pkgdir/usr/share/licenses/$_pkgname"
  install LICENSE "$pkgdir/usr/share/licenses/$_pkgname"

  # Package documentation
  install -d "$pkgdir/usr/share/doc/$_pkgname"
  install README.md "$pkgdir/usr/share/doc/$_pkgname"
}