summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 77f5a402bbe1e4ecea2caaa8a9ef707ce56a790e (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
# Maintainer: SimPilotAdamT <adam_tazul@outlook.com>

pkgname=vmware-unlocker-git
_pkgver=4.2.6
pkgver=4.2.6
pkgrel=2
pkgdesc="VMware macOS utilities, from the dev branch of the upstream repo"
arch=("x86_64")
url="https://github.com/DrDonk/unlocker/"
license=('MIT')
depends=("vmware-workstation>=16.0.0" "bash")
makedepends=("git" "go")
provides=("vmware-unlocker")
conflicts=("vmware-unlocker" "vmware-unlocker-bin")
source=("$pkgname::git+$url#branch=main" "vmware-unlocker-post.hook" "vmware-unlocker-pre.hook")
sha512sums=("SKIP"
  "3c22eb82eb02a1bee88a50f8ffcf71bd60679f53540325f56d7865c32f229dfdc02fde34a9a6f0d8f1bc8eae078c21149a2f6e3cbd6f233db1fe34296839865a"
  "68990bed2f93f7ee7b648270af8304044b8ae33bb295fa9418edc6728676d94a5443843d63f01c31c99a7381fb822fad06ed052b6eb7ae92e91e9bed8dbe1302"
)

pkgver() {
  cd "$srcdir/$pkgname"
  __pkgver=$(echo "$_pkgver.$(git rev-list --count HEAD).$(git rev-parse --short HEAD)" | rev | cut -c 2- | rev)
  echo "$__pkgver"
}

build() {
  cd "$srcdir/$pkgname/"
  sed -e '/winres/ s/^#*/#/; /exe/ s/^#*/#/; /syso/ s/^#*/#/; /Windows/ s/^#*/#/; /windows/ s/^#*/#/; /darwin/ s/^#*/#/;' -i build.sh
  bash build.sh "$pkgver"
}

package() {
  mkdir -p "$pkgdir/usr/iso/"
  mkdir -p "$pkgdir/usr/bin/"
  mkdir -p "$pkgdir/usr/backup/"
  mkdir -p "$pkgdir/etc/pacman.d/hooks/"
  mkdir -p "$pkgdir/usr/share/licenses/$pkgname/"
  install -Dm755 "$srcdir/$pkgname/build/linux/"* "$pkgdir/usr/bin/"
  install -Dm644 "$srcdir/$pkgname/build/iso/"* "$pkgdir/usr/iso/"
  install -Dm644 "$srcdir/"*.hook "$pkgdir/etc/pacman.d/hooks/"
  install -Dm644 "$srcdir/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}