db-move: moved seahorse from [testing] to [extra] (x86_64)
[arch-packages.git] / btrfs-progs / trunk / PKGBUILD
blob06aec3950c8fc85ba98fe0d6df60aedd5ddf6d9d
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=6.3
7 pkgrel=2
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' 'systemd-libs')
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       )
27 install=btrfs-progs.install
28 options=(!staticlibs)
29 sha256sums=('SKIP'
30             '40a0bdff787ecb490e5533dbcefd4852176daf12aae5a1158203db43d8ad6a7d'
31             'bbe60b35d1b1e2efc1308a8f54f1fdc6808240a81c5f5b4d75321b7ee86e41f4'
32             '35efeee8590d6d60c711ae9cdc918e4841ab61d10cb02359e65e36ebff95ffc5'
33             'eaa7af92d28bfa8940bb551560fd7be777f9f175292eaa72b5f6ef00fb240252'
34             '9a0b6cc23f7bd97b83b6c38dd2b4e4373fead8bd3ccfb82a47c72971e9d6f8ad')
36 prepare() {
37   cd $pkgname-v$pkgver
38   # apply patch from the source array (should be a pacman feature)
39   local src
40   for src in "${source[@]}"; do
41     src="${src%%::*}"
42     src="${src##*/}"
43     [[ $src = *.patch ]] || continue
44     echo "Applying patch $src..."
45     patch -Np1 < "../$src"
46   done
49 build() {
50   cd $pkgname-v$pkgver
51   ./configure --prefix=/usr --with-crypto=libgcrypt
52   make
55 check() {
56   cd $pkgname-v$pkgver
57  ./btrfs filesystem show
60 package() {
61   cd $pkgname-v$pkgver
62   make DESTDIR="$pkgdir" install install_python
64   # install bash completion (FS#44618)
65   install -Dm644 btrfs-completion "$pkgdir/usr/share/bash-completion/completions/btrfs"
67   # install mkinitcpio hooks
68   cd "$srcdir"
69   install -Dm644 initcpio-install-btrfs "$pkgdir/usr/lib/initcpio/install/btrfs"
70   install -Dm644 initcpio-hook-btrfs "$pkgdir/usr/lib/initcpio/hooks/btrfs"
72   # install scrub service/timer
73   install -Dm644 btrfs-scrub@.service "$pkgdir/usr/lib/systemd/system/btrfs-scrub@.service"
74   install -Dm644 btrfs-scrub@.timer "$pkgdir/usr/lib/systemd/system/btrfs-scrub@.timer"
77 # vim:set ts=2 sw=2 ft=sh et: