summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1866defca2dc790754fc4efbae04d7007e1b302a (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
# Maintainer: Pranay Kanwar <pranay.kanwar@gmail.com>
# Maintainer: Anthony25 <anthony.ruhier@gmail.com>

_pkgname=diskscan
pkgname=${_pkgname}-git
pkgver=0.21.r2.g4773146
pkgrel=1
pkgdesc="CLI tool to scan block devices for unreadable sectors"
arch=('i686' 'x86_64')
url="https://github.com/baruch/diskscan"
license=('GPL3')
depends=('python-yaml')
makedepends=('cmake')
conflicts=("${_pkgname}")
replaces=("${_pkgname}")
source=("${pkgname}"::"git+https://github.com/baruch/diskscan.git")
sha256sums=('SKIP')

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

prepare() {
	cd "$srcdir/${pkgname}"
	cmake . -DCMAKE_INSTALL_PREFIX=/usr
}

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

package() {
	cd "$srcdir/${pkgname}"
	make DESTDIR="$pkgdir/" PREFIX="/usr" install
}