summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3ae5452a3ada8c4f9955de3aa6ac29e0d2ba0324 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Contributor: Caleb Maclennan <caleb@alerque.com>
# Contributor: Jerome Leclanche <jerome@leclan.ch>
# Contributor: Tim Schumacher <timschumi@gmx.de>

pkgname=heimdall-git
_pkgname=Heimdall
pkgver=2.2.2.r0.gd9554e7
pkgrel=1
pkgdesc="Tool suite used to flash firmware (ROMs) onto Samsung Galaxy S devices (grimler fork)"
arch=(x86_64)
url="https://git.sr.ht/~grimler/Heimdall"
license=(MIT)
depends=(
  gcc-libs
  glibc
  libusb
  zlib
)
makedepends=(
  cmake
  qt6-base
)
optdepends=(
  "qt6-base: GUI support for heimdall-frontend"
)
source=(
  $_pkgname::git+https://git.sr.ht/~grimler/Heimdall
  heimdall.desktop
)
sha256sums=(
  "SKIP"
  "439cea1a8976b9b589ffe4030a084243bcc5e937dcb9c571cdb94d3ff08b4fb4"
)
conflicts=(heimdall)
provides=(heimdall)

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

build() {
  local cmake_options=(
    -B build
    -D CMAKE_BUILD_TYPE=None
    -D CMAKE_INSTALL_PREFIX=/usr
    -S $_pkgname
    -W no-dev
  )

  cmake "${cmake_options[@]}"
  cmake --build build --verbose
}

package() {
  install -vDm 755 build/bin/* -t "$pkgdir"/usr/bin/
  install -vDm 644 $_pkgname/heimdall/60-heimdall.rules -t "$pkgdir"/usr/lib/udev/rules.d/
  install -vDm 644 heimdall.desktop -t "$pkgdir/usr/share/applications/"
  install -vDm 644 $_pkgname/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}