core/os-prober/PKGBUILD

45 lines
1.3 KiB
Bash
Raw Normal View History

2010-10-06 14:29:33 +08:00
pkgname=os-prober
2017-09-07 10:41:25 +08:00
pkgver=1.76
2014-11-10 03:37:31 +08:00
pkgrel=1
pkgdesc="Utility to detect other OSes on a set of drives"
2010-10-06 14:29:33 +08:00
url="http://joey.kitenet.net/code/os-prober/"
arch=('x86_64')
2014-11-10 03:37:31 +08:00
license=('GPL3')
depends=('sh')
2016-02-14 20:55:17 +08:00
source=(ftp://ftp.debian.org/debian/pool/main/o/${pkgname}/${pkgname}_${pkgver}.tar.xz)
2017-09-07 10:41:25 +08:00
sha256sums=('d3a580610e0148ee1fea98de993b27b856870fb0a31e9ce1a33be2654e2c64ed')
2010-10-06 14:29:33 +08:00
2014-11-10 03:37:31 +08:00
prepare() {
2017-09-07 10:41:25 +08:00
cd "$pkgname-$pkgver"
2010-10-06 14:29:33 +08:00
# adjust lib dir to allow detection of 64-bit distros
2014-11-10 03:37:31 +08:00
sed -i -e "s:/lib/ld\*\.so\*:/lib*/ld*.so*:g" os-probes/mounted/common/90linux-distro
rm -f Makefile
}
build() {
2017-09-07 10:41:25 +08:00
cd "$pkgname-$pkgver"
2010-10-06 14:29:33 +08:00
2014-11-10 03:37:31 +08:00
make newns
2012-07-18 05:11:51 +08:00
}
package() {
2017-09-07 10:41:25 +08:00
cd "$pkgname-$pkgver"
2014-11-10 03:37:31 +08:00
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"
2010-10-06 14:29:33 +08:00
done
2014-11-10 03:37:31 +08:00
install -Dm755 os-probes/mounted/powerpc/20macosx "$pkgdir"/usr/lib/os-probes/mounted/20macosx
2014-11-10 03:37:31 +08:00
install -dm755 "$pkgdir"/var/lib/os-prober
}