Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-boot/aboot/
Date: Sun, 01 Aug 2021 19:10:35
Message-Id: 1627845004.10cb7a2970d65a2d1dbaefb5eb1f53b116bd6c2d.mattst88@gentoo
1 commit: 10cb7a2970d65a2d1dbaefb5eb1f53b116bd6c2d
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 1 19:08:23 2021 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 1 19:10:04 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10cb7a29
7
8 sys-boot/aboot: Add git ebuild
9
10 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
11
12 sys-boot/aboot/aboot-9999.ebuild | 67 ++++++++++++++++++++++++++++++++++++++++
13 1 file changed, 67 insertions(+)
14
15 diff --git a/sys-boot/aboot/aboot-9999.ebuild b/sys-boot/aboot/aboot-9999.ebuild
16 new file mode 100644
17 index 00000000000..d3e6321ec03
18 --- /dev/null
19 +++ b/sys-boot/aboot/aboot-9999.ebuild
20 @@ -0,0 +1,67 @@
21 +# Copyright 1999-2021 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=7
25 +
26 +inherit toolchain-funcs
27 +
28 +if [[ ${PV} = 9999* ]]; then
29 + EGIT_REPO_URI="https://github.com/mattst88/${PN}.git"
30 + inherit git-r3
31 +else
32 + SRC_URI="https://github.com/anholt/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
33 + KEYWORDS="-* ~alpha"
34 +fi
35 +
36 +DESCRIPTION="Alpha Linux boot loader for SRM"
37 +HOMEPAGE="https://github.com/mattst88/aboot https://sourceforge.net/projects/aboot/"
38 +
39 +LICENSE="GPL-2"
40 +SLOT="0"
41 +
42 +BDEPEND="app-text/docbook-sgml-utils"
43 +
44 +src_compile() {
45 + emake AR=$(tc-getAR) CC=$(tc-getCC) LD=$(tc-getLD) \
46 + all netabootwrap
47 +
48 + einfo "Building man pages"
49 + emake -C doc/man
50 +}
51 +
52 +src_install() {
53 + dodir /boot /sbin /usr/share/man/man{1,5,8}
54 + emake root="${D}" install
55 +
56 + insinto /boot
57 + doins net_aboot.nh
58 + dobin netabootwrap
59 + dodoc ChangeLog INSTALL README TODO aboot.conf
60 +
61 + insinto /etc
62 + newins "${FILESDIR}"/aboot.conf aboot.conf.example
63 +
64 +}
65 +
66 +pkg_postinst() {
67 + einfo "To make aboot install a new bootloader on your harddisk follow"
68 + einfo "these steps:"
69 + einfo ""
70 + einfo " - edit the file /etc/aboot.conf"
71 + einfo " - cd /boot"
72 + einfo " - swriteboot -c2 /dev/sda bootlx"
73 + einfo " This will install a new bootsector on /dev/sda and aboot will"
74 + einfo " use the second partition on this device to lookup kernel and "
75 + einfo " initrd (as described in the aboot.conf file)"
76 + einfo ""
77 + einfo "IMPORTANT :"
78 + einfo ""
79 + einfo "The partition table of your boot device has to contain "
80 + einfo "a BSD-DISKLABEL and the first 12 megabytes of your boot device"
81 + einfo "must not be part of a partition as aboot will write its bootloader"
82 + einfo "in there and not as with most x86 bootloaders into the "
83 + einfo "master boot sector. If your partition table does not reflect this"
84 + einfo "you are going to destroy your installation !"
85 + einfo "Also note that aboot currently only supports ext2/3 partitions"
86 + einfo "to boot from."
87 +}