blob: dfb9259097f52680ca3a6d9b4c2bbfceaaec86de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Id: quik-2.0.1.0-r1.ebuild,v 1.2 2002/07/11 06:30:55 drobbins Exp $
S="${WORKDIR}/quik-2.0"
A="quik_2.0e.orig.tar.gz"
echo "workdir is:"
echo ${WORKDIR}
DEB_P="quik_2.0e-1.diff"
DEB_URI="ftp://ftp.debian.org/debian/pool/main/q/quik"
DESCRIPTION="OldWorld PowerMac Bootloader"
SRC_URI="${DEB_URI}/${A} ${DEB_URI}/${DEB_P}.gz"
DEPEND="virtual/glibc"
RDEPEND=""
pkg_setup() {
[ "${ROOT}" != "/" ] && return 0
. ${ROOT}/etc/init.d/functions.sh
local fstabstate="$(cat /etc/fstab |grep -v -e '#' |awk '{print $2}')"
local procstate="$(cat /proc/mounts |awk '{print $2}')"
if [ -n "$(echo ${fstabstate} |grep -e "/boot")" ] && \
[ -n "$(echo ${procstate} |grep -e "/boot")" ]
then
einfo "Your boot partition was detected as being mounted as /boot."
einfo "Files will be installed there for this bootloader to function correctly."
elif [ -n "$(echo ${fstabstate} |grep -e "/boot")" ] && \
[ -z "$(echo ${procstate} |grep -e "/boot")" ]
then
mount /boot &>/dev/null
if [ "$?" -eq 0 ]
then
einfo "Your boot partition was not mounted as /boot, but portage was able to mount"
einfo "it without additional intervention."
einfo "Files will be installed there for this bootloader to function correctly."
else
eerror "Your boot partition has to be mounted on /boot before the installation"
eerror "can continue. This bootloader needs to install important files there."
die "Please mount your /boot partition."
fi
else
einfo "You do not have a seperate /boot partition."
fi
}
src_unpack() {
cd ${WORKDIR}
unpack ${A} || die
zcat ${DISTDIR}/${DEB_P}.gz | patch -p1 -d ${S}|| die
}
src_compile() {
emake || die
}
src_install () {
# 'll have a look at this later
install -d -m 755 ${D}/sbin || die
install -d -m 755 ${D}/etc || die
install -d -m 755 ${D}/boot || die
install -d -m 755 ${D}/usr/share/man/man5 || die
install -d -m 755 ${D}/usr/share/man/man8 || die
install -s -m 755 quik/quik ${D}/sbin || DIE
install -m 644 man/quik.conf.5 \
${D}/usr/share/man/man5 || DIE
install -m 644 man/quik.8 man/bootstrap.8 \
${D}/usr/share/man/man8 || DIE
install -m 444 first/first.b second/second.b \
second/second ${D}/boot || die
install -m 644 etc/quik.conf ${D}/etc || die
}
|