jobcore/btrfs-progs/PKGBUILD

81 lines
2.8 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobcore/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=btrfs-progs
pkgver=6.5.2
pkgrel=01
pkgdesc='Btrfs filesystem utilities w/o systemd'
makedepends=('git' 'asciidoc' 'xmlto' 'python' 'python-setuptools' 'e2fsprogs' 'reiserfsprogs' 'python-sphinx')
depends=('glibc' 'util-linux-libs' 'lzo' 'zlib' 'zstd' 'libgcrypt')
optdepends=('python: libbtrfsutil python bindings'
'e2fsprogs: btrfs-convert'
'reiserfsprogs: btrfs-convert')
#url='https://btrfs.wiki.kernel.org'
url='https://btrfs.readthedocs.io'
replaces=('btrfs-progs-unstable')
conflicts=('btrfs-progs-unstable')
provides=('btrfs-progs-unstable')
#options=(!staticlibs debug) ## uncomment this to have the debug pkg produced
options=(!staticlibs)
source=("https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v$pkgver.tar."{xz,sign}
# "https://github.com/kdave/btrfs-progs/commit/839b2d587da9d691c2f2e7cdb5301eed23781d1d.patch"
# "https://github.com/kdave/btrfs-progs/commit/03f41ac508d2c47fdfef08f0fd27ab154f7dcfd8.patch"
'initcpio-install-btrfs'
'initcpio-hook-btrfs')
install=btrfs-progs.install
prepare() {
cd $pkgname-v$pkgver
# apply patch from the source array (should be a pacman feature)
local src
for src in "${source[@]}"; do
src="${src%%::*}"
src="${src##*/}"
[[ $src = *.patch ]] || continue
echo "Applying patch $src..."
patch -Np1 < "../$src"
done
}
build() {
cd $pkgname-v$pkgver
./configure --prefix=/usr --with-crypto=libgcrypt
make
}
check() {
cd $pkgname-v$pkgver
./btrfs filesystem show
}
package() {
cd $pkgname-v$pkgver
make DESTDIR="$pkgdir" install install_python
# install bash completion (FS#44618)
install -Dm644 btrfs-completion "$pkgdir/usr/share/bash-completion/completions/btrfs"
# install mkinitcpio hooks
cd "$srcdir"
install -Dm644 initcpio-install-btrfs "$pkgdir/usr/lib/initcpio/install/btrfs"
install -Dm644 initcpio-hook-btrfs "$pkgdir/usr/lib/initcpio/hooks/btrfs"
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=('GPL2-only')
validpgpkeys=('F2B41200C54EFB30380C1756C565D5F9D76D583B')
sha256sums=(c558b2ddd43f5747a2f5cb62aed3e5c5099703886485a480310fed4698d3610c # btrfs-progs-v6.5.2.tar.xz
a0800e868e819d183a1b3cc758fb2b0b8956cffba6dc628673e8ab75f8fa3ab4 # btrfs-progs-v6.5.2.tar.sign
bbe60b35d1b1e2efc1308a8f54f1fdc6808240a81c5f5b4d75321b7ee86e41f4 # initcpio-install-btrfs
35efeee8590d6d60c711ae9cdc918e4841ab61d10cb02359e65e36ebff95ffc5) # initcpio-hook-btrfs
## 21d9855128533766a48ef724e2cc65373f1cc87946c4e1dfa0e20401a6d65ba1 btrfs-progs-6.5.2-01-x86_64.pkg.tar.lz