summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 04a2ecb0d4c7436057386dee3c8299c7ee529312 (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
49
50
51
52
53
54
# Maintainer: dreieck

_pkgname=balong-usbdload
pkgname="${_pkgname}-git"
_pkgver=latest
pkgver=r83.fdcec46
pkgrel=3
pkgdesc='Low level USB Flashing/ downloader utility for Huawei E3372 and other modems baesd on Balong v7. Includes temporary usb loader "firmware" for some devices.'
arch=('i686' 'x86_64')
url="http://github.com/forth32/balong-usbdload"
license=('GPL3')
depends=()
optdepends=("balongflash: For flashing firmware after downloading temporary USB downloader code with ${_pkgname}.")
makedepends=('git')
provides=(
  "${_pkgname}=${pkgver}"
  "balong-usbdload-data=${pkgver}"
)
conflicts=("${_pkgname}")
options=()

source=(
  "${_pkgname}::git+https://github.com/forth32/balong-usbdload.git"
  "helpmessages_english.txt"
  "README.english.md"
)

sha256sums=(
  'SKIP'
  '96346a31d173909514a29dca5e2a7eb0540b635ae42220b179f2654a35e9d2ab'
  'b418646e48436a8b55733bf270e3050cbf6ecaa1ec31862f06754333dd691594'
)

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

build() {
  cd "${srcdir}/${_pkgname}"
  make
}

package() {
  cd "${srcdir}/${_pkgname}"
  install -v -d -m755 "${pkgdir}/usr/bin/"
  install -v -m755 balong-usbdload loader-patch ptable-injector "${pkgdir}/usr/bin"
  install -v -d -m755 "${pkgdir}/usr/share/${_pkgname}/data"
  install -v -m644 *.bin "${pkgdir}/usr/share/${_pkgname}/data"

  install -v -D -m644 README.md "${pkgdir}/usr/share/doc/${_pkgname}/README.md"
  install -v -D -m644 "${srcdir}/README.english.md" "${pkgdir}/usr/share/doc/${_pkgname}/README.english.md"
  install -v -D -m644 "${srcdir}/helpmessages_english.txt" "${pkgdir}/usr/share/doc/${_pkgname}/helpmessages_english.txt"
}