summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 672e7191b4b07c40f2ddd9f2a704b379ad5e9557 (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
# Maintainer: Vianney le Clément <vleclement AT gmail·com>
_pkgname=bootimgtool
pkgname=$_pkgname-git
pkgver=20150607.g9ccd962
pkgrel=2
pkgdesc="Android boot.img extractor/assembler handling multiple variants"
arch=('i686' 'x86_64')
url="https://github.com/vianney/bootimgtool"
license=('GPL3')
depends=('openssl')
makedepends=('git' 'cmake')
source=("git+https://github.com/vianney/$_pkgname.git")
md5sums=('SKIP')

pkgver() {
  cd "$srcdir/$_pkgname"
  _date=$(git show -s --format='%ci' | cut -d' ' -f1 | sed 's/-//g')
  _hash=$(git show -s --format='%h')
  echo "$_date.g$_hash"
}

build() {
  cd "$srcdir/$_pkgname"
  mkdir -p build && cd build
  cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
  cmake --build .
}

package() {
  cd "$srcdir/$_pkgname/build"
  DESTDIR="$pkgdir" cmake --build . --target install
}