summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2fc624f39b4aa0d53c02508cfcf3ed0b9d8e0cbf (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
# Maintainer: Chih-Hsuan Yen <yan12125@gmail.com>
# Contributor: Adam Harvey <adam@adamharvey.name>

pkgname=apfs-fuse-git
pkgver=r77.670e45e
pkgrel=1
pkgdesc="FUSE driver for APFS (Apple File System)"
arch=('i686' 'x86_64')
url="https://github.com/sgan81/apfs-fuse"
license=('GPL2')
depends=('fuse3' 'bzip2' 'zlib')
makedepends=('git' 'cmake')
provides=("${pkgname%-git}=$pkgver")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/sgan81/apfs-fuse'
        'git+https://github.com/lzfse/lzfse')
sha256sums=('SKIP'
            'SKIP')

pkgver() {
  cd "${pkgname%-git}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd "${pkgname%-git}"
  git submodule init
  git config submodule.3rdparty/lzfse.url "$srcdir/lzfse"
  git submodule update
  mkdir -p build
}

build() {
  cd "${pkgname%-git}/build"
  cmake ..
  make
}

package() {
  cd "${pkgname%-git}/build"
  for binary in apfs-dump apfs-dump-quick apfs-fuse ; do
    install -Dm755 $binary "$pkgdir/usr/bin/$binary"
  done
}