jobextra/os-prober/PKGBUILD-arch

47 lines
1.7 KiB
Plaintext

# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Timothy Redaelli <timothy.redaelli@gmail.com>
# Contributor: darkcoder <mario_vazq@hotmail.com>
pkgname=os-prober
pkgver=1.80
pkgrel=1
pkgdesc='Utility to detect other OSes on a set of drives'
url='https://joeyh.name/code/os-prober/'
arch=('x86_64')
license=('GPL3')
depends=('sh')
source=(http://http.debian.net/debian/pool/main/o/${pkgname}/${pkgname}_${pkgver}.tar.xz)
sha512sums=('51b4fefb784d5ecf34f5148157ef233e2979c4a679a54600144be473bb6ccaf263c9121701a1ecc7523c7e3bfc439a4e3a92a5eb92431ead99cbe666b0f0e6f5')
b2sums=('56883c7d3f4c5dde2904cffc77fdf6a2c1caf230f9e84197e8d976e446815838448bb42afd18d4c9526efac9907db3d2e77c6f54889011d2d03d284a44ff4cbd')
prepare() {
cd ${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
}
build() {
cd ${pkgname}-${pkgver}
make newns
}
package() {
cd ${pkgname}-${pkgver}
install -Dm 755 os-prober linux-boot-prober -t "${pkgdir}/usr/bin"
install -Dm 755 newns -t "${pkgdir}/usr/lib/os-prober"
install -Dm 755 common.sh -t "${pkgdir}/usr/share/os-prober"
for dir in os-probes os-probes/mounted os-probes/init linux-boot-probes linux-boot-probes/mounted; do
install -dm 755 "${pkgdir}/usr/lib/${dir}"
install -m 755 -t "${pkgdir}/usr/lib/${dir}" "${dir}"/common/*
[[ -d "${dir}"/x86 ]] && cp -r "${dir}"/x86/* "${pkgdir}/usr/lib/${dir}"
done
install -Dm 755 os-probes/mounted/powerpc/20macosx "${pkgdir}"/usr/lib/os-probes/mounted/20macosx
install -dm 755 "${pkgdir}"/var/lib/os-prober
}
# vim: ts=2 sw=2 et: