jobextra/os-prober/PKGBUILD

64 lines
1.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/jobextra/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=os-prober
pkgver=1.81.r5.g13be421
pkgrel=02
pkgdesc="Tool to detect other filesystems with operating systems on them"
url="https://tracker.debian.org/pkg/os-prober"
depends=('glibc' 'sh')
makedepends=('git')
provides=("$pkgname=$pkgver")
conflicts=('os-prober-git' 'os-prober-btrfs' 'os-prober-garuda')
source=("git+https://salsa.debian.org/installer-team/$pkgname.git")
pkgver() {
cd $pkgname
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd ${pkgname}
# adjust lib dir to allow detection of 64-bit distros
sed -i -e "s:/lib/ld\*\.so\*:/lib*/ld*.so*:g" os-probes/mounted/common/90linux-distro
rm -f Makefile
}
build() {
cd $pkgname
make newns
}
package() {
cd $pkgname
depends=(sh which)
install -Dm755 {linux-boot-prober,$pkgname} -t "$pkgdir/usr/bin"
install -Dm755 "newns" -t "$pkgdir/usr/lib/$pkgname"
install -Dm755 "common.sh" -t "$pkgdir/usr/share/$pkgname"
for dir in linux-boot-probes linux-boot-probes/mounted os-probes os-probes/init os-probes/mounted; do
install -Dm755 "$dir/common"/* -t "$pkgdir/usr/lib/$dir"
[[ -d "$dir/x86" ]] && cp -r "$dir/x86"/* "$pkgdir/usr/lib/$dir"
done
install -Dm755 "os-probes/mounted/powerpc/20macosx" -t "$pkgdir/usr/lib/os-probes/mounted"
install -dm755 "$pkgdir/var/lib/$pkgname"
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=(GPL)
sha256sums=(SKIP)
## 124062c10b406a14617234bda3e08b097e7c2634c019f490ae938d6857ccbbad os-prober-1.81.r5.g13be421-02-x86_64.pkg.tar.lz