First published on: 18.Aug.2026

1) Create a custom directory which will host the repository details:
# mkdir /var/db/repos/mycustom-repo
2) Create the repo's sub-directories:
# mkdir /var/db/repos/mycustom-repo/metadata
# mkdir /var/db/repos/mycustom-repo/x11-plugins
# mkdir /var/db/repos/mycustom-repo/x11-plugins/mycustom-gkrellm-fchart
3) Create the layout-file "/var/db/repos/mycustom-repo/metadata/layout.conf":
repo-name = mycustom-repo
masters = gentoo
thin-manifests = true
4) Create the ebuild package file:

(here creating for example the package file "/var/db/repos/mycustom-repo/x11-plugins/mycustom-gkrellm-fchart/mycustom-gkrellm-fchart-1.0.3.ebuild" for the gkrellm plugin "fchart")

EAPI=8

inherit gkrellm-plugin flag-o-matic

DESCRIPTION="MYCUSTOM - GKrellM plugin to graph arbitrary values from a simple text file"
HOMEPAGE="https://www.cs.hmc.edu/~geoff/gkrellm-fchart.html"
SRC_URI="https://www.cs.hmc.edu/~geoff/tars/gkrellm-fchart-${PV}.tgz"

S="${WORKDIR}/gkrellm-fchart-${PV}"

LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="amd64 ~x86"

#Prevent Portage from trying to download the tgz-file from the official Gentoo mirrors as it does not exist there
RESTRICT="nomirror"

#Specify the .so file that 'make' generates so gkrellm-plugin.eclass knows what to copy
PLUGIN_SO=( fchart$(get_modname) )

src_compile() {
  #Append the flag to downgrade incompatible pointer types from fatal errors to warnings
  #  (this needs "inherit flag-o-matic" at the top of this script)
  #  (the sourcecode of "fchart" is very old and GCC 15 will error out without this flag)
  append-cflags -Wno-error=incompatible-pointer-types
  
  #Pass the CFLAGS and LDFLAGS defined in /etc/portage/make.conf
  emake CFLAGS="${CFLAGS} -fPIC" LDFLAGS="${LDFLAGS}"
}
5) Generate the manifest file:
# cd /var/db/repos/mycustom-repo/x11-plugins/mycustom-gkrellm-fchart
# ebuild mycustom-gkrellm-fchart-1.0.3.ebuild digest

(same command as well when having to regenerate it)

6) Refresh the "eix" cache, check if the new package is available and if yes then emerge/install it:
# eix-update
# eix mycustom
[I] x11-plugins/mycustom-gkrellm-fchart [1]
    Available versions:  1.0.3
    Installed versions:  1.0.3(09:22:06 PM 08/15/2026)
    Homepage:            https://www.cs.hmc.edu/~geoff/gkrellm-fchart.html
    Description:         MYCUSTOM - GKrellM plugin to graph arbitrary values from a simple text file
# emerge -pv x11-plugins/mycustom-gkrellm-fchart