Andrew Connell (one of the best known SharePoint MVP's around) has posted an article about using the, rather unknown, ElementFile node in which you can specify which files are included in your custom feature definition. So why do you wan to do this you might wonder.. well.. read the following snippet
When you package everything up in a WSS solution package you list your Feature's definition file within the manifest.xml file (using the <FeatureManifests /> node) which contain the instructions to SharePoint of what to do with the files within the package (*.wsp). If you have additional files that go along with your Feature, you should be listing them in the manifest.xml file as well using something like <TemplateFiles /> or <RootFiles /> (the former is preferred). But, if you listed all the files that were part of the Feature using the <ElementFile /> nodes within the Feature definition, you wouldn't have to list them here. Why? Because SharePoint will look at the definition and see those are files that are part of the Feature itself so the solution framework will deploy those as well.
Read the whole article including a sample how your feature.xml will look like if you use this approach here : Using the ElementFile node in Feature definitions saves you in the deployment
Btw if you are unsure how to build your own feature and/or solution package, read the following articles which I found very useful:
- How To Build a Solution Pack (WSP)
- Deploying Web Parts with Solution Packages in WSS v3/MOSS 2007
- Development Tools and Techniques for Working with Code in Windows SharePoint Services 3.0 (Parts