summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d6ee4e43be7e4aa1950522b045655226b0274d69 (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
55
56
57
58
# Maintainer: "Darren Ng <$(base64 --decode <<<VW4xR2ZuQGdtYWlsLmNvbQo=)>"
pkgname=genimage-git
pkgver=v14.r82.43fccb5
pkgrel=4
pkgdesc="tool to generate multiple filesystem and flash images from a tree"
arch=($CARCH)
url=https://github.com/pengutronix/${pkgname%-*}
license=(GPL2)

depends=(confuse)
makedepends=(git)
optdepends=(
  # android-simg2img # AUR
  # simg-tools # AUR
  'android-tools: simg2img'
  cpio
  'cramfs-tools: mkcramfs'
  dtc
  genext2fs
  'mtools: fat'
  'qemu-headless: qemu-img' # "qemu-headless" can be provided by "qemu"
  rauc
  'uboot-tools: mkimage'
)
checkdepends=($( printf "%s\n" "${optdepends[@]}" | cut -d':' -f1 ))
provides=(${pkgname%-*})
conflicts=(${pkgname%-*})

source=(${pkgname%-*}::git+https://github.com/pengutronix/${pkgname%-*}.git)
sha1sums=(SKIP)

pkgver() {
  cd ${pkgname%-*}
  printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}

build() {
  cd ${pkgname%-*}
  # autoupdate # Corrupts ./configure
  ./autogen.sh
  ./configure \
    --prefix=/usr \
    --enable-silent-rules \
    --disable-dependency-tracking
  make
}

check() {
  cd ${pkgname%-*}
  make -k check
}

package() {
  cd ${pkgname%-*}
  make DESTDIR="$pkgdir/" install
  install -vdm755 "$pkgdir/usr/share/doc/${pkgname%-*}"
  cp -Lv README.rst "$_"
}