core/os-prober/PKGBUILD
Daniele 2f77ec9983 A bit of cleanup to os-prober to follow more strictly the Debian package.
I actually started by upgrading the package, but seems that Anke was faster than me, so I'm now redoing this commit just to preserve the cleanup done beforehand.
2012-07-18 03:20:37 +02:00

58 lines
1.8 KiB
Bash

#
# Chakra Packages for Chakra, part of chakra-project.org
#
# maintainer abveritas[at]chakra-project[dot]org>
pkgname=os-prober
pkgver=1.54
pkgrel=1
pkgdesc="Utility to detect other operating systems on a set of drives."
url="http://joey.kitenet.net/code/os-prober/"
arch=('i686' 'x86_64')
license=('GPL')
depends=('sh')
makedepends=('gcc' 'sed')
source=("ftp://ftp.us.debian.org/debian/pool/main/o/${pkgname}/${pkgname}_${pkgver}.tar.gz")
md5sums=('9a7e8e5adeeaff4913f727fa2c95490a')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
# adjust lib dir to allow detection of 64-bit distros
sed -e "s:/lib/ld\*\.so\*:/lib*/ld*.so*:g" \
-i os-probes/mounted/common/90linux-distro || return 1
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
install -D -m755 linux-boot-prober "${pkgdir}/usr/bin/linux-boot-prober"
install -D -m755 os-prober "${pkgdir}/usr/bin/os-prober"
install -D -m755 newns "${pkgdir}/usr/lib/os-prober/newns"
install -D -m755 common.sh "${pkgdir}/usr/share/os-prober/common.sh"
local probelist=('os-probes' 'os-probes/mounted' 'os-probes/init'
'linux-boot-probes' 'linux-boot-probes/mounted')
for probes in "${probelist[@]}"; do
install -d -m755 "${pkgdir}/usr/lib/${probes}"
install -m755 -t "${pkgdir}/usr/lib/${probes}" "${probes}/common"/*
if [ -e "${probes}/x86" ]; then
install -d -m755 "${pkgdir}/usr/lib/${probes}"
install -m755 -t "${pkgdir}/usr/lib/${probes}" "${probes}/x86"/*
fi
done
install -D -m755 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
install -d "${pkgdir}/var/lib/os-prober"
touch "${pkgdir}/var/lib/os-prober/labels"
chmod 644 "${pkgdir}/var/lib/os-prober/labels"
}
# vim:set ts=2 sw=2 et: