jobcore/btrfs-progs/PKGBUILD

88 lines
3.3 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://git.disroot.org/joborun-pkg/jobcore/src/branch/main/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=btrfs-progs
pkgver=6.10.1
pkgrel=02
pkgdesc='Btrfs filesystem utilities w/o systemd'
makedepends=('asciidoc' 'xmlto' 'python' 'python-setuptools' 'e2fsprogs'
'python-sphinx' 'python-sphinx_rtd_theme' 'automake' 'autoconf')
depends=('glibc' 'util-linux-libs' 'lzo' 'zlib' 'zstd' 'libgcrypt')
optdepends=('python: libbtrfsutil python bindings'
'e2fsprogs: 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}
source=("git+https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git?signed#tag=v${pkgver}"
'initcpio-install-btrfs'
'initcpio-hook-btrfs')
install=btrfs-progs.install
prepare() {
cd $pkgname
# 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
./autogen.sh
./configure --prefix=/usr --with-crypto=libgcrypt
make
}
check() {
cd $pkgname
./btrfs filesystem show
}
package() {
cd $pkgname
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=('GPL-2.0-only')
validpgpkeys=('F2B41200C54EFB30380C1756C565D5F9D76D583B')
b2sums=('2704650efc795e8e01670306959781cf10d9837da227ffb15ffcd81d09751c8070e01edd834287c65fcb25dd0889a5060c36fc033affd32160b37c27270e137c'
'75659665a24f92bba1175a2fcae942d9851495c9cff88570b88a98dced4eb98fcc9879de044bfc7d560dbe1c71a20d7ae51ca4b7c2649f90d646b414e0864b6e'
'0d3c25d0cb6fdb8e8777723b5e199835fac25573bc8f7fcb248ccfeea7268752b7100dd2c8284529812f0b1d3943eceb5785f119959f89bffedcf30472a915db')
# '4408d0f81634c99f874a2dde8fc289f61d9e00d5c2d2efd465bcc90db69112604ec987a46858f48c0c2ce1cb4499de1355ad4baf847a74b40c148f8d7a516d22'
# '9601b31936e1c4b69e6be517f545c6520302fa946eb3203e2d50bd85e918c87a9512e3b40d4e8cee6b9ae4a3fe9fbde26052305beec10fa2c49732a08d1f6753')
sha256sums=(710915b0cbcfdc4fc09daf5f135a867ee932324f450d47e427fe738da69e67e4 # btrfs-progs
# 8af0811fffe01e21a987747990348d4efacef27e35a8fdbb09fac17fb017e1e3 # btrfs-progs-v6.10.1.tar.sign
bbe60b35d1b1e2efc1308a8f54f1fdc6808240a81c5f5b4d75321b7ee86e41f4 # initcpio-install-btrfs
35efeee8590d6d60c711ae9cdc918e4841ab61d10cb02359e65e36ebff95ffc5) # initcpio-hook-btrfs
##
##