summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: aa39d4d60bf045a40227c977d439ca37e8f70219 (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
# Maintainer: willemw <willemw12@gmail.com>
# Contributor: Caltlgin Stsodaat <contact@fossdaily.xyz>

pkgname=crazydiskinfo-git
pkgver=1.1.0.r0.g803a585
pkgrel=3
pkgdesc='Interactive ncurses S.M.A.R.T. viewer'
arch=(x86_64)
url=https://github.com/otakuto/crazydiskinfo
license=(MIT)
depends=(libatasmart)
makedepends=(cmake git)
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("$pkgname::git+$url.git")
sha256sums=('SKIP')

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

prepare() {
  sed -i 's|tinfow|tinfo|g;s|/usr/sbin|/usr/bin|g' $pkgname/CMakeLists.txt
}

build() {
  cmake -B build -S $pkgname -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -Wno-dev
  make -C build
}

package() {
  install -Dm644 $pkgname/LICENSE -t "$pkgdir/usr/share/licenses/${pkgname%-git}"
  make -C build DESTDIR="$pkgdir/" install
}