summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4bb12df40bbee69ca9f10f75051d97acb09ad585 (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
# Maintainer: 

pkgname=flakyflash-git
_pkgname=flakyflash
pkgver=r21.04bee13
pkgrel=1
pkgdesc='a Linux-based tool for diagnosing and salvaging FAT- and exFAT-formatted flash media having flaky sectors that do not retain data correctly'
url='https://github.com/whitslack/flakyflash'
arch=(x86_64)
license=('custom:Unlicense')
conflicts=(flakyflash)
provides=(flakyflash)
depends=('glibc' 'gcc-libs')
optdepends=()
source=('git+https://github.com/whitslack/flakyflash.git')
md5sums=('SKIP')


pkgver() {
  cd "$_pkgname"
 # git describe --long --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

prepare() {
  cd $_pkgname
  git submodule update --init --recursive
}

build() {
  cd "$_pkgname"
  make
}

package() {
  cd "$_pkgname"
  install -Dm755 "out/$(gcc -dumpmachine)/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
 
  install -Dm644 UNLICENSE "$pkgdir/usr/share/licenses/$_pkgname/UNLICENSE"
}