# $Id: PKGBUILD 76031 2012-09-09 10:59:08Z tredaelli $ # Maintainer: Timothy Redaelli # Contributor: darkcoder pkgname=os-prober pkgver=1.55 pkgrel=1 pkgdesc="Utility to detect other OSes on a set of drives" url="http://joey.kitenet.net/code/os-prober/" arch=('i686' 'x86_64' 'mips64el') license=('GPL3') depends=('sh') source=(ftp://ftp.debian.org/debian/pool/main/o/${pkgname}/${pkgname}_${pkgver}.tar.gz) md5sums=('a516bc304a10345d2116d5b9b70bacc3') sha512sums=('dde7f648f0f54906b936ddf05b02166f44b0a9c64291fffa5390b7d96b434a9937577ff22f55dce0711e14775cd7d88c391feb8dd0a8b17d0a6235e91ae4b5d9') build() { cd "$srcdir/$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 make newns } package() { cd "$srcdir/$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 ]] && install -m755 -t "$pkgdir/usr/lib/$dir" "$dir"/x86/* done install -Dm755 os-probes/mounted/powerpc/20macosx $pkgdir/usr/lib/os-probes/mounted/20macosx # create a empty labels file, will be used by os-prober at execution mkdir -p $pkgdir/var/lib/os-prober touch $pkgdir/var/lib/os-prober/labels chmod 644 $pkgdir/var/lib/os-prober/labels }