Portage Overlay Howto
Howto
- You cannot simply overwrite ebuilds in /usr/portage, as any
such change will be discarded by next emerge sync command. You have
to setup a portage overlay instead.
- Create a new directory that will be root of your own portage tree, e. g.
/usr/local/portage.
- The structure under that directory match the /usr/portage structure. (It
doesn't mean you have to create or copy all directories from
/usr/portage. Leave the new directory empty.)
- Add the following line to your /etc/make.conf file (of course,
replace /usr/local/portage by a path to your portage overlay
directory as created in step 2):
PORTDIR_OVERLAY=/usr/local/portage
- Put a new ebuild to appropriate subdirectory of your portage overlay
directory. For example, to add openoffice-bin-1.1.5.ebuild to your
portage overlay, you have to create
/usr/local/portage/app-office/openoffice-bin/ directory and put
your ebuild there.
- If there are some patches coupled to the ebuild, you have to put them to
the files/ directory - e. g. to
/usr/local/portage/app-office/openoffice-bin/files/.
- Change to the directory with your ebuild and invoke ebuild
digest command on the ebuild - e. g. ebuild
openoffice-bin-1.1.5.ebuild digest.
- You can now simply emerge the package, e. g. emerge
=openoffice-bin-1.1.5. Your portage overlay precedes the regular
portage tree, so your ebuild will be used even if there exists ebuild with
the same name in the regular portage tree.
References