Difference between revisions of "Custom Profiles"
(→Example of how to set up) |
|||
| Line 15: | Line 15: | ||
=== Example of how to set up === | === Example of how to set up === | ||
| − | + | For our example we will create a mix-in profile called 'fake_pro' in a local overlay called 'local_overlay'. fake_pro will set the 'dummy' USE flag globally and also set the 'fake' USE flag on sys-apps/not-exist. We will then add the profile to eselect so it's visible when running 'eselect profile'. | |
| + | |||
| + | ==== Creating the profile ==== | ||
| + | We will use ${OVERLAY_DIR} as the path to local_overlay. These instructions assume the overlay exists. | ||
| + | If you haven't set a name for your overlay, do that first. | ||
| + | <pre> | ||
| + | echo "local_overlay" > ${OVERLAY_DIR}/profiles/repo_name | ||
| + | </pre> | ||
| + | |||
| + | Next lets create a directory to store our profiles. Since we're creating a 'mix-ins' profile we need to make sure our profile is inside a 'mix-ins' subdirectory. This is a requirement in order to ensure that the profile will show up in eselect. If your not planning on using eselect then there's no requirement to use 'mix-ins' | ||
| + | <pre> | ||
| + | install -d ${OVERLAY_DIR}/profiles/my_profiles/mix-ins/fake_pro | ||
| + | </pre> | ||
Revision as of 02:08, 6 September 2012
Want to create your own custom profiles? Thought up a mix-in that's not currently in the Funtoo profiles? Have an overlay with profiles and want to make it easy for people to use them? Well you've come to the right place. This article will show you how to easily add you own profiles. No more ugly hacking of parent files and other nonsense. Once you follow this guide, not only will portage easily recognize your profiles, they will also show up in eselect right along with the ones from the main tree.
Contents |
How to do it
Rules to follow
- For eselect support you will need the new version from funtoo. Currently >=eselect-1.3.1.1_rc2.
- Your overlay must have a profiles directory. It must include a repo_name file with the name of your overlay.
- Your profiles must be inside of the profiles directory
- You need a profiles.eselect.desc file inside the profiles directory. See profiles.eselect.example in your funtoo portage tree for instructions
- If your creating profiles of types arch,build,flavor, or mix-ins, your profile must be inside a directory with same name. Ex profiles/my_profile/flavor/new_profile, profiles/my_profile/mix-ins/subdir/profile.
- Currently NoMix (see profiles.eselect.example) is only supported for profiles in the same tree.
Example of how to set up
For our example we will create a mix-in profile called 'fake_pro' in a local overlay called 'local_overlay'. fake_pro will set the 'dummy' USE flag globally and also set the 'fake' USE flag on sys-apps/not-exist. We will then add the profile to eselect so it's visible when running 'eselect profile'.
Creating the profile
We will use ${OVERLAY_DIR} as the path to local_overlay. These instructions assume the overlay exists. If you haven't set a name for your overlay, do that first.
echo "local_overlay" > ${OVERLAY_DIR}/profiles/repo_name
Next lets create a directory to store our profiles. Since we're creating a 'mix-ins' profile we need to make sure our profile is inside a 'mix-ins' subdirectory. This is a requirement in order to ensure that the profile will show up in eselect. If your not planning on using eselect then there's no requirement to use 'mix-ins'
install -d ${OVERLAY_DIR}/profiles/my_profiles/mix-ins/fake_pro