mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-12 02:14:37 +08:00
56 lines
1.6 KiB
Bash
56 lines
1.6 KiB
Bash
#
|
|
# Chakra Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# maintainer abveritas[at]chakra-project[dot]org>
|
|
|
|
pkgname=os-prober
|
|
pkgver=1.64
|
|
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
|
|
os-prober-util-linux-2.24.patch)
|
|
md5sums=('b13047131d2b1a924ed97dd0fa0885a7'
|
|
'ce6218a8a0f791b617a79d29d097d7d8')
|
|
sha256sums=('b0c14b530dd83856d17736e3758700f7e89fbf0ff6f6c20104b3b4ae1d8579df'
|
|
'5271a50ebeaea23b5f1e02a5d61b9a68c3b8f978f48cd8511cbec78773200e8e')
|
|
|
|
prepare() {
|
|
cd "$pkgname"
|
|
|
|
patch -p1 -i "$srcdir"/os-prober-util-linux-2.24.patch
|
|
|
|
# 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"
|
|
|
|
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
|
|
}
|