Let me start out by saying I'm sure WSP builder or STSdev is the way to go, but I can't use those where I work, so I'm having to do this all manually. So here's where I am.
I have created a simple solution for MOSS 2007 to make a custom menu item on the Site Actions menu. I have the manifest.xml file which points to the .dll, elements.xml and feature.xml files.
Contents of myCustomSAMenuItem.ddf
.OPTION EXPLICIT
.Set CabinetNAmeTemplate=myCustomSAMenuItem.wsp
.Set DiskDirectoryTemplate=CDROM
.Set CompressionType=MSZIP
.Set UniqueFile="ON"
.Set Cabinet=on
.Set DiskDirectory1=Package
manifest.xml
bin\debug\myCustomSAMenuItem.dll
.Set DestinationDir=MycustomFeature
\features\myCustomSAMenuItem\feature.xml
\features\myCustomSAMenuItem\elements.xml
Contents of Manifest.xml
<Solution xmlns="http://schemas.microsoft.com/sharepoint/"
SolutionId="GUID"
DeploymentServerType="WebFrontEnd">
<FeatureManifests>
<FeatureManifest Location="myCustomSAMenuItem\feature.xml" \>
<FeatureManifest Location="myCustomSAMenuItem\elements.xml" \>
</FeatureManifests>
<Assemblies>
<Assembly Location="myCustomSAMenuItem.dll" DeploymentTarget="GlobalAssemblyCache" />
</Assemblies>
</Solution>
Contents of Feature.xml
<Feature xmlns="http://schmeas.microsoft.com/sharepoint/" Id="GUID" Scope="site" Title=" my site actions customization" description="site actions menu customization" >
<ElementManifests>
<ElementManifest Location="elements.xml" />
</ElementManifests>
</Feature>
Contents of Elements.xml
<Elements xmlns="http://schmeas.microsoft.com/sharepoint" >
<CustomAction
Id="myCustomSAMenuItem"
GroupId="SiteActions"
Location="Microsoft.SharePoint.StandardMenu"
Title="SP Site Actions Menu"
Description="Custom Site Action">
<UrlAction Url="http://www.google.com" />
</CustomAction>
</Elements>
When I run makecab.exe /f myCustomSAMenuItem.ddf
, it works and all the files are packaged into a wsp file. When I look inside the file everything has the correct path.
But when I run stsadm -o addsolution -filename package\myCustomSAMenuItem.wsp
it returns "The feature path myCustomSAMenuItem\elements.xml' must be of the form 'directory\feature.xml'."
If I remove the element.xml file I can get it added and deployed, but the element.xml file contains the xml that does what I want so without that it's useless.