PKGBUILD 1.57 KB
Newer Older
Lisa's avatar
Lisa committed
1 2 3
# NOTE: major version should be in sync with the Linux
# kernel.

Drake Justice's avatar
Drake Justice committed
4
pkgname=btrfs-progs
AlmAck's avatar
AlmAck committed
5
pkgver=4.17
AlmAck's avatar
AlmAck committed
6
pkgrel=4
Drake Justice's avatar
Drake Justice committed
7
pkgdesc='Btrfs filesystem utilities'
AlmAck's avatar
AlmAck committed
8
arch=('x86_64')
AlmAck's avatar
AlmAck committed
9
depends=('glibc' 'util-linux' 'e2fsprogs' 'lzo2' 'zlib' 'zstd')
AlmAck's avatar
AlmAck committed
10
makedepends=('git' 'asciidoc' 'xmlto' 'systemd' 'python3-setuptools')
Drake Justice's avatar
Drake Justice committed
11 12
url='http://btrfs.wiki.kernel.org/'
license=('GPL2')
Lisa Vitolo's avatar
Lisa Vitolo committed
13
source=("https://github.com/kdave/${pkgname}/archive/v${pkgver}.tar.gz"
Drake Justice's avatar
Drake Justice committed
14
        'initcpio-install-btrfs'
15 16 17
        'initcpio-hook-btrfs'
        'btrfs-scrub@.service'
        'btrfs-scrub@.timer')
AlmAck's avatar
AlmAck committed
18
md5sums=('60c827c9946bc26697eede8b41742e77'
Drake Justice's avatar
Drake Justice committed
19
         '7241ba3a4286d08da0d50b7176941112'
20 21 22
         'b09688a915a0ec8f40e2f5aacbabc9ad'
         '794b867e09451284c545bae112aa0cfd'
         'a290e0ab88b7b4675cd20f5a2befc8cb')
Lisa Vitolo's avatar
Lisa Vitolo committed
23 24 25
install=btrfs-progs.install
options=(!staticlibs)

Drake Justice's avatar
Drake Justice committed
26
build() {
Chaoting Liu's avatar
Chaoting Liu committed
27
   cd $pkgname-$pkgver
AlmAck's avatar
AlmAck committed
28
    ./autogen.sh
AlmAck's avatar
AlmAck committed
29 30
   ./configure --prefix=/usr
   make
Drake Justice's avatar
Drake Justice committed
31 32
}

AlmAck's avatar
AlmAck committed
33
check() {
Chaoting Liu's avatar
Chaoting Liu committed
34
   cd $pkgname-$pkgver
AlmAck's avatar
AlmAck committed
35 36 37
   ./btrfs filesystem show
}

Drake Justice's avatar
Drake Justice committed
38
package() {
Chaoting Liu's avatar
Chaoting Liu committed
39
   cd $pkgname-$pkgver
Drake Justice's avatar
Drake Justice committed
40

41
   make DESTDIR=${pkgdir} prefix=/usr install
Ram-Z's avatar
Ram-Z committed
42

AlmAck's avatar
AlmAck committed
43 44
   # install bash completion (FS#44618)
   install -Dm644 btrfs-completion "$pkgdir/usr/share/bash-completion/completions/btrfs"
Drake Justice's avatar
Drake Justice committed
45 46 47 48

   # install mkinitcpio hooks
   cd "$srcdir"
   install -Dm644 initcpio-install-btrfs "$pkgdir/usr/lib/initcpio/install/btrfs"
Ram-Z's avatar
Ram-Z committed
49
   install -Dm644 initcpio-hook-btrfs    "$pkgdir/usr/lib/initcpio/hooks/btrfs"
50 51 52

   # install scrub service/timer
   install -Dm644 btrfs-scrub@.service "$pkgdir/usr/lib/systemd/system/btrfs-scrub@.service"
Ram-Z's avatar
Ram-Z committed
53
   install -Dm644 btrfs-scrub@.timer   "$pkgdir/usr/lib/systemd/system/btrfs-scrub@.timer"
Drake Justice's avatar
Drake Justice committed
54 55
}

Lisa Vitolo's avatar
Lisa Vitolo committed
56