This is an old post, you might want to read how I make my first Ebuild From Scratch !!
I had a problem installing gnome, see http://forums.gentoo.org/viewtopic-t-924192-highlight-.html
It’s temporary solved by a local ebuild atm, building the ebuild by the documentation was rather hard, some stuff is not mentioned.
So here’s my:
Quick How To Clone Your First Ebuild
Package “app-admin/system-config-printer-common” is my example!
Create Local Portage Overlay
Make a folder:
mkdir -p /usr/local/portage
and set the folder in /etc/make.conf:
Copy the original package
mkdir -p /usr/local/portage/app-admin/system-config-printer-common
# you need the files folder
cp -r /usr/portage/app-admin/system-config-printer-common/files .
Update: This needed the folder because it contained a patch. the ebuild should contain correct urls to download the sources. I still have to figure this out better.
# clone the ebuild, I gave it a new name
cp /usr/portage/app-admin/system-config-printer-common/system-config-printer-common-1.3.9-r1.ebuild .
mv system-config-printer-common-1.3.9-r1.ebuild system-config-printer-common-1.3.9-r2.ebuild
Edit your new ebuild file
Do what has to be done ;-)
Create the .manifest file
ebuild system-config-printer-common-1.3.9-r2.ebuild manifest
If your installation fails, be shure to run
ebuild system-config-printer-common-1.3.9-r2.ebuild clean
Also run this before emerging anything, it seems to clean up stuffI also recall running “setup”
ebuild system-config-printer-common-1.3.9-r2.ebuild setup
to test the ebuild. Run “clean” afterwards!
Mask your ebuild to verify the problem was in the original ebuild
You can mask your ebuild in /etc/portage/package.mask, for example:
will mask my local ebuild, the original package will be installed.Note the “=” operator!
Operators are required when noting the version/release number, then wildcards can be used (not after a period).
Play around until it works ;-)
Different output for local ebuilds:
visible with “emerge -a”:
These are the packages that would be merged, in order:Calculating dependencies… done!
# emerge -av system-config-printer-common
[ebuild R ] app-admin/system-config-printer-common-1.3.9-r2::x-portage USE=”-doc -policykit” 0 kB
and after the confirmation:
>>> Emerging (1 of 1) app-admin/system-config-printer-common-1.3.9-r2 from x-portage