summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e68d6c673c5f3fdfd2f4910cd76c7a4085d012e8 (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
61
62
63
64
65
66
67
68
# Maintainer: Kyle De'Vir (QuartzDragon) <kyle.devir.mykolab.com>

pkgname=bcachefs-tools-git
pkgver=472
pkgrel=1
pkgdesc="BCacheFS filesystem utilities"
url="https://github.com/koverstreet/bcachefs-tools"
arch=("x86_64")
license=("GPL2")
install="${pkgname}.install"

provides=("bcachefs-tools")
makedepends=(
    "attr"
    "git"
    "keyutils"
    "libaio"
    "libscrypt"
    "libsodium"
    "liburcu"
    "libutil-linux"
    "pkgconf"
    "zlib"
)
depends=(
    "libscrypt"
    "libsodium"
    "liburcu"
)

_reponame="bcachefs-tools"
_repo_url="https://github.com/koverstreet/${_reponame}"

source=(
    "git+${_repo_url}"
    "add-mkinitcpio-hook-for-Arch.patch"
)
sha256sums=('SKIP'
            'b4d6bc483b417ceaa5c628c686a613e568e64a699288da0388d508a481c710e9')

pkgver() {
    cd "${srcdir}/${_reponame}"

    echo "$(git rev-list --count HEAD)"
}

prepare() {
    cd "${srcdir}/${_reponame}"
    
    patch -Np1 -i "../add-mkinitcpio-hook-for-Arch.patch"
}

build() {
    cd "${srcdir}/${_reponame}"

    make EXTRA_CFLAGS="-O0"
}

package() {
    cd "${srcdir}/${_reponame}"

    make DESTDIR="${pkgdir}" PREFIX="/usr" ROOT_SBINDIR="/usr/bin" INITRAMFS_DIR="/etc/initcpio" install
    
    install -Dm644 "arch/etc/initcpio/hooks/bcachefs" \
                   "${pkgdir}/etc/initcpio/hooks/bcachefs"
    install -Dm644 "arch/etc/initcpio/install/bcachefs" \
                   "${pkgdir}/etc/initcpio/install/bcachefs"
}