core/os-prober/PKGBUILD

49 lines
1.4 KiB
Bash
Raw Normal View History

2010-10-06 14:29:33 +08:00
pkgname=os-prober
2015-08-01 17:29:20 +08:00
pkgver=1.66
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')
2014-11-10 03:37:31 +08:00
source=(ftp://ftp.debian.org/debian/pool/main/o/${pkgname}/${pkgname}_${pkgver}.tar.xz
os-prober-util-linux-2.24.patch)
2015-08-01 17:29:20 +08:00
sha256sums=('ab66eab63223d651cb6f9221ddffc958521b13edee4996c4fd87f08cb1955057'
2014-11-10 03:37:31 +08:00
'5271a50ebeaea23b5f1e02a5d61b9a68c3b8f978f48cd8511cbec78773200e8e')
2010-10-06 14:29:33 +08:00
2014-11-10 03:37:31 +08:00
prepare() {
cd "$pkgname"
2010-10-06 14:29:33 +08:00
2014-11-10 03:37:31 +08:00
patch -p1 -i "$srcdir"/os-prober-util-linux-2.24.patch
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() {
cd "$pkgname"
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() {
2014-11-10 03:37:31 +08:00
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"
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
}