| 1 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sys-boot/os-prober/os-prober-1.51.ebuild,v 1.1 2012/03/30 04:21:10 floppym Exp $ |
| 4 |
|
| 5 |
EAPI=4 |
| 6 |
|
| 7 |
inherit eutils multilib toolchain-funcs |
| 8 |
|
| 9 |
DESCRIPTION="Utility to detect other OSs on a set of drives" |
| 10 |
HOMEPAGE="http://packages.debian.org/source/sid/os-prober" |
| 11 |
SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${PN}_${PV}.tar.gz" |
| 12 |
|
| 13 |
LICENSE="GPL-3" |
| 14 |
SLOT="0" |
| 15 |
KEYWORDS="~amd64 ~x86" |
| 16 |
IUSE="" |
| 17 |
|
| 18 |
src_prepare() { |
| 19 |
find "${S}" -type f -exec sed -i -e "s:/usr/lib/:/usr/libexec/:g" {} + || die |
| 20 |
|
| 21 |
# use default GNU rules |
| 22 |
rm Makefile |
| 23 |
} |
| 24 |
|
| 25 |
src_compile() { |
| 26 |
tc-export CC |
| 27 |
emake newns |
| 28 |
} |
| 29 |
|
| 30 |
src_install() { |
| 31 |
dobin os-prober linux-boot-prober |
| 32 |
|
| 33 |
exeinto /usr/libexec/os-prober |
| 34 |
doexe newns |
| 35 |
|
| 36 |
insinto /usr/share/os-prober |
| 37 |
doins common.sh |
| 38 |
|
| 39 |
keepdir /var/lib/os-prober |
| 40 |
|
| 41 |
local debarch=${ARCH%-*} dir |
| 42 |
|
| 43 |
case ${debarch} in |
| 44 |
amd64) debarch=x86 ;; |
| 45 |
ppc|ppc64) debarch=powerpc ;; |
| 46 |
esac |
| 47 |
|
| 48 |
for dir in os-probes{,/mounted,/init} linux-boot-probes{,/mounted}; do |
| 49 |
exeinto /usr/libexec/$dir |
| 50 |
doexe $dir/common/* |
| 51 |
if [[ -d $dir/$debarch ]]; then |
| 52 |
doexe $dir/$debarch/* |
| 53 |
fi |
| 54 |
done |
| 55 |
|
| 56 |
if use amd64 || use x86; then |
| 57 |
exeinto /usr/libexec/os-probes/mounted |
| 58 |
doexe os-probes/mounted/powerpc/20macosx |
| 59 |
fi |
| 60 |
|
| 61 |
dodoc README TODO debian/changelog |
| 62 |
} |
| 63 |
|
| 64 |
pkg_postinst() { |
| 65 |
elog "If you intend for os-prober to detect versions of Windows installed on" |
| 66 |
elog "NTFS-formatted partitions, your system must be capable of reading the" |
| 67 |
elog "NTFS filesystem. One way to do this is by installing sys-fs/ntfs3g" |
| 68 |
} |