Gimp 2.4 doesn't have CMYK support (it'll come later, when the GEGL has matured). However, the Separate+ gimp plugin can create colour separations from an RGB image and save as an CMYK TIFF file.
Get it from the Gimp plugin registry, here: Separate+.
Install for a single user
I got Separate+ version 0.5.2. The README file provided with the plugin does a good job of explaining how to install it. Because I run Gentoo Linux and I didn't want to screw with the system-wide Gimp installation, I installed it for my user only.
- Ensure you have LittleCMS library installed (I already had this installed, as the media-libs/lcms package).
- Download the Separate+ plugin archive from the Gimp plugin site. I got version 0.5.2.
- Unzip the archive and cd into the separate+-0.5.2 directory that was created.
- Install for the current user by running 'make INSTALLDIR=~/.gimp-2.4/plug-ins/ install-plugins'.
- Create the ~/colors/icc directory.
- Copy sRGB/sRGB\ Color\ Space\ Profile.icm into ~/colors/icc/
- (Optionally) Download the Adobe ICC profiles from the Adobe website.
- (Optionally) Unzip the Adobe ICC profiles archive and copy all files from 'CMYK Profiles' and 'RGB Profiles' into ~/colors/icc/.
Now, when you start Gimp and open an image, you should see a new option called 'Separate' in the 'Images' menu.
Create and save CMYK image
To create a CMYK image, do Images -> Separate -> Separate, choosing whichever RGB and CMYK ICC you want from those detected (from those in your ~/colors/icc directory). I believe the defaults are sRGB IEC61966-2.1 and U.S. Web Coated (SWOP) v2.
I found that selecting 'Preserve pure black' created a CMYK image with better blacks (no surprise there!).
To save the CMYK file, do Image -> Separate -> Save...
Gotchas
It seems you can only generate a CMYK image from a flat RGB file, e.g. jpg, and not from an xcf file.