archrelease: copy trunk to extra-x86_64
[arch-packages.git] / btrfs-progs / trunk / PKGBUILD
blob64a7fddae3cee46b7f1dd882a213cd5375b70772
1 # Maintainer: Sébastien "Seblu" Luttringer <seblu@archlinux.org>
2 # Contributor: Tom Gundersen <teg@jklm.no>
3 # Contributor: Tobias Powalowski <tpowa@archlinux.org>
5 pkgname=btrfs-progs
6 pkgver=5.18.1
7 pkgrel=1
8 pkgdesc='Btrfs filesystem utilities'
9 arch=('x86_64')
10 makedepends=('git' 'asciidoc' 'xmlto' 'systemd' 'python' 'python-setuptools' 'e2fsprogs' 'reiserfsprogs' 'python-sphinx')
11 depends=('glibc' 'util-linux-libs' 'lzo' 'zlib' 'zstd' 'libgcrypt')
12 optdepends=('python: libbtrfsutil python bindings'
13             'e2fsprogs: btrfs-convert'
14             'reiserfsprogs: btrfs-convert')
15 url='https://btrfs.wiki.kernel.org'
16 replaces=('btrfs-progs-unstable')
17 conflicts=('btrfs-progs-unstable')
18 provides=('btrfs-progs-unstable')
19 license=('GPL2')
20 validpgpkeys=('F2B41200C54EFB30380C1756C565D5F9D76D583B')
21 source=("https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v$pkgver.tar."{sign,xz}
22         'initcpio-install-btrfs'
23         'initcpio-hook-btrfs'
24         'btrfs-scrub@.service'
25         'btrfs-scrub@.timer')
26 install=btrfs-progs.install
27 options=(!staticlibs)
28 sha256sums=('SKIP'
29             '6e98a75ccff52e9354daa1ad284c614c490f844273a2fa524cbac9eb841c7255'
30             'bbe60b35d1b1e2efc1308a8f54f1fdc6808240a81c5f5b4d75321b7ee86e41f4'
31             '35efeee8590d6d60c711ae9cdc918e4841ab61d10cb02359e65e36ebff95ffc5'
32             'eaa7af92d28bfa8940bb551560fd7be777f9f175292eaa72b5f6ef00fb240252'
33             '9a0b6cc23f7bd97b83b6c38dd2b4e4373fead8bd3ccfb82a47c72971e9d6f8ad')
35 prepare() {
36   cd $pkgname-v$pkgver
37   # apply patch from the source array (should be a pacman feature)
38   local src
39   for src in "${source[@]}"; do
40     src="${src%%::*}"
41     src="${src##*/}"
42     [[ $src = *.patch ]] || continue
43     echo "Applying patch $src..."
44     patch -Np1 < "../$src"
45   done
48 build() {
49   cd $pkgname-v$pkgver
50   ./configure --prefix=/usr --with-crypto=libgcrypt
51   make
54 check() {
55   cd $pkgname-v$pkgver
56  ./btrfs filesystem show
59 package() {
60   cd $pkgname-v$pkgver
61   make DESTDIR="$pkgdir" install install_python
63   # install bash completion (FS#44618)
64   install -Dm644 btrfs-completion "$pkgdir/usr/share/bash-completion/completions/btrfs"
66   # install mkinitcpio hooks
67   cd "$srcdir"
68   install -Dm644 initcpio-install-btrfs "$pkgdir/usr/lib/initcpio/install/btrfs"
69   install -Dm644 initcpio-hook-btrfs "$pkgdir/usr/lib/initcpio/hooks/btrfs"
71   # install scrub service/timer
72   install -Dm644 btrfs-scrub@.service "$pkgdir/usr/lib/systemd/system/btrfs-scrub@.service"
73   install -Dm644 btrfs-scrub@.timer "$pkgdir/usr/lib/systemd/system/btrfs-scrub@.timer"
76 # vim:set ts=2 sw=2 ft=sh et: