pkgname=os-prober pkgver=1.66 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) sha256sums=('ab66eab63223d651cb6f9221ddffc958521b13edee4996c4fd87f08cb1955057' '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 }