mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 06:57:15 +08:00
45 lines
1.3 KiB
Bash
45 lines
1.3 KiB
Bash
pkgname=os-prober
|
|
pkgver=1.76
|
|
pkgrel=1
|
|
pkgdesc="Utility to detect other OSes on a set of drives"
|
|
url="http://joey.kitenet.net/code/os-prober/"
|
|
arch=('x86_64')
|
|
license=('GPL3')
|
|
depends=('sh')
|
|
source=(ftp://ftp.debian.org/debian/pool/main/o/${pkgname}/${pkgname}_${pkgver}.tar.xz)
|
|
sha256sums=('d3a580610e0148ee1fea98de993b27b856870fb0a31e9ce1a33be2654e2c64ed')
|
|
|
|
prepare() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
# 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-$pkgver"
|
|
|
|
make newns
|
|
}
|
|
|
|
package() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
install -Dm755 linux-boot-prober "$pkgdir"/usr/bin/linux-boot-prober
|
|
install -Dm755 os-prober "$pkgdir"/usr/bin/os-prober
|
|
install -Dm755 newns "$pkgdir"/usr/lib/os-prober/newns
|
|
install -Dm755 common.sh $pkgdir/usr/share/os-prober/common.sh
|
|
|
|
for dir in os-probes os-probes/mounted os-probes/init linux-boot-probes linux-boot-probes/mounted; do
|
|
install -dm755 "$pkgdir/usr/lib/$dir"
|
|
install -m755 -t "$pkgdir/usr/lib/$dir" "$dir"/common/*
|
|
[[ -d "$dir"/x86 ]] && cp -r "$dir"/x86/* "$pkgdir/usr/lib/$dir"
|
|
done
|
|
|
|
install -Dm755 os-probes/mounted/powerpc/20macosx "$pkgdir"/usr/lib/os-probes/mounted/20macosx
|
|
|
|
install -dm755 "$pkgdir"/var/lib/os-prober
|
|
}
|