BIOS/MBR(CSM Boot)なマシンにgentooをインストールし直す機会があった。
fdclone-3.01j.ebuild 書いてみた。
無保証
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
DESCRIPTION="FDClone: Console Filer"
HOMEPAGE="http://hp.vector.co.jp/authors/VA012337/soft/fd/"
SRC_URI="http://hp.vector.co.jp/authors/VA012337/soft/fd/FD-${PV}.tar.gz \
ftp://ftp.unixusers.net/src/fdclone/FD-${PV}.tar.gz"
LICENSE="FDCLONE"
SLOT="0"
KEYWORDS="~amd64 ~x86"
#IUSE=""
RDEPEND="sys-libs/ncurses"
DEPEND="${RDEPEND}"
S="${WORKDIR}/FD-${PV}"
src_compile(){
emake LDFLAGS=-ltinfo
}
src_install(){
dobin fd fd-dict.tbl fd-unicd.tbl fd-cat.ja fd-cat.C
dosym fd /usr/bin/fdsh
dodoc FAQ* HISTORY* Install* LICENSES* README* TECHKNOW* ToAdmin*
newman fd_e.man fd.1
dosym /usr/share/man/man1/fd.1 /usr/share/man/man1/fdsh.1
insinto /usr/share/man/ja/man1
doins fd.1;
dosym /usr/share/man/ja/man1/fd.1 /usr/share/man/ja/man1/fdsh.1
insinto /etc
newins _fdrc fd2rc
}
はじめる前に自分overlay作ったほうが楽
https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/CustomTree/ja#.E3.82.AB.E3.82.B9.E3.82.BF.E3.83.A0.E3.83.AA.E3.83.9D.E3.82.B8.E3.83.88.E3.83.AA.E3.82.92.E5.AE.9A.E7.BE.A9.E3.81.99.E3.82.8B
の通りにoverlay
mkdir -p /var/db/repos/localrepo/{metadata,profiles}
chown -R portage:portage /var/db/repos/localrepo
echo 'localrepo' > /var/db/repos/localrepo/profiles/repo_name
sudo emacs /var/db/repos/localrepo/metadata/layout.conf
masters = gentoo
auto-sync = false
sudo emacs /etc/portage/repos.conf/localrepo.conf
[localrepo]
location = /var/db/repos/localrepo
cat /etc/portage/repos.conf/gentoo.conf
[DEFAULT]
main-repo = gentoo
[gentoo]
location = /var/db/repos/gentoo
sync-type = git
sync-uri = https://github.com/gentoo-mirror/gentoo
sync-git-verify-commit-signature = yes
sync-openpgp-key-path = /usr/share/openpgp-keys/gentoo-release.asc
auto-sync = yes
うちのfdcloneは
/var/db/repos/localrepo/app-misc/fdclone/fdclone-3.01j.ebuild
4128日後