Portage setup
You are going to want a Portage overlay in which to put your own ebuild scripts. Having such a place will keep separation between the core Gentoo ebuilds and stuff you dabble with. Lets start with adding your Portage overlay: 'sudo mkdir -p /usr/local/portage'. This is where we are going to put your custom ebuilds. If you are interested, look in '/usr/portage'. Here you will see a lot of ebuilds that come via Gentoo's network.
To notify Gentoo (more specifically Portage) of this new overlay you will want to add the following line into the '/etc/make.conf' file:
PORTDIR_OVERLAY="/usr/local/portage"Next up we need to have a category. Categories separate ebuilds by function and or purpose. For instance the web Server Apache is found in the 'www-servers' category. You can maybe find it @ '/usr/portage/www-servers' on your machine. You can pick any category name you like for this exercise. I'm going to be using 'ottaway'. For the category create a folder in '/usr/local/portage', in my case I do 'sudo mkdir /usr/local/portage/ottaway'. Substitute 'ottaway' for the name of your category.
To make Portage aware of this new category I add the line 'ottaway' to the '/etc/portage/categories' file.
Getting CouchDB
You will need to get the ebuild script for CouchDB. It is found as an attachment on this page. I used the following to download the script:
curl https://bugs.gentoo.org/attachment.cgi?id=159315 > couchdb-0.8.0.ebuildYou could pretty easily use wget also. I put this in my Portage overlay in my custom category @ '/usr/local/portage/ottaway', you must do the same for your category.
Next up you are going to have to tell Gentoo that you are ok with certain development ebuilds being installed. I did this by adding the following lines to the '/usr/portage/package.keywords' file:
# couchdb stuffYou can put those lines anywhere in the file. If you used a category name other than 'ottaway' change the value in the last line of the example above.
dev-lang/erlang
dev-util/svn2cl
dev-lang/spidermonkey
ottaway/couchdb ~x86
Next up I was ready to install the whole thing. You can do so using:
sudo emerge =Where <yourcategory><yourcategory>/couchdb-0.8.0
4 comments:
Very nice! I'm curious why you chose your own category? Seems like making things more difficult without much benefit.
I imagine it could be more difficult. I'm no expert (yet) in the Gentoo environment. I would really appreciate insight from more experienced users :) Maybe could use a dev something or other category that already exists?
By using an existing category, you can ignore the bit about adding it to /etc/portage/categories. You could also just `emerge couchdb` instead of specifying an exact category and version, because that's the only ebuild of it.
I'd put couchdb in the dev-db category. Seems to be the best fit.
Post a Comment