summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 84c643dcef76ed785dbfff618febc766ca7894d9 (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
# Maintainer: Davide Depau <davide@depau.eu>

_pkgname=mkbootimg
pkgname=$_pkgname-git
pkgver=2020.05.18.r0.g8dd5b5b5
pkgrel=2
pkgdesc="Android mkbootimg + unpackbootimg, forked and updated (osm0sis)"
arch=('i686' 'x86_64' 'aarch64' 'armv7h')
url="https://github.com/osm0sis/mkbootimg"
license=('Apache')
source=(${_pkgname}::git+https://github.com/osm0sis/mkbootimg.git)
sha256sums=('SKIP')
provides=($_pkgname unpackbootimg)
conflicts=($_pkgname unpackbootimg)

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

prepare() {
  cd "$srcdir/${_pkgname}"
	sed s/-Werror/-W/g -i Makefile
}

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

package() {
  cd "$srcdir/${_pkgname}"
	install -Dm755 mkbootimg "$pkgdir"/usr/bin/mkbootimg-osm0sis
	install -Dm755 unpackbootimg "$pkgdir"/usr/bin/unpackbootimg
}