summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 767cd5c5f24b297a44d29687676d7ab3b11baebe (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=r68.c7036a3
pkgrel=1
pkgdesc="FUSE driver for APFS (Apple File System)"
arch=('i686' 'x86_64')
url="https://github.com/sgan81/apfs-fuse"
license=('GPL2')
depends=('fuse2' '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
}