What i do is to include my customzation in one or more Features, and deploy those features and other related customization using a Solution.
Features and Solutions is actually defined using Xml files using different CAML schemas
Here is a list of CAML schemas
http://msdn2.microsoft.com/en-us/library/ms462365.aspx
The ones that would be interested in are probably:
Feature
http://msdn2.microsoft.com/en-us/library/ms414322.aspx
Solution
http://msdn2.microsoft.com/en-us/library/ms442108.aspx
Site
http://msdn2.microsoft.com/en-us/library/aa544502.aspx
Once you have defined your Feature(s) and Solution, you must create a ddf file containing references to all files refrenced by your feature(s) and solution in order to generate a .wsp (a cab file with another extension) file wich is the actual installable.
I have included a very very simple feature for you to build on, the only thing the feature does is to provision a single file to the style library:
Feature.xml
<!-- _lcid="1033" _version="12.0.4407" _dal="1" -->
<!-- _LocalBinding -->
<Feature Id="5b3ec5b8-e35a-4cef-ac21-3f0156bc6c00"
Title="SimpleFeature"
Description="A feature that provisions a single file"
Version="1.0.0.0"
Scope="Site"
Hidden="False"
DefaultResourceFile="core"
Creator="You"
ActivateOnDefault="True"
AlwaysForceInstall="True"
xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="ProvisionedFiles.xml"/>
</ElementManifests>
</Feature>
ProvisionedFiles.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- _lcid="1033" _version="12.0.4518" _dal="1" -->
<!-- _LocalBinding -->
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Module Name="Yourfile" Url="Style Library" Path="" RootWebOnly="TRUE">
<File Url="yourfile.txt" Type="GhostableInLibrary" />
</Module>
</Elements>
Manifest.xml (Solution)
<?xml version="1.0" encoding="utf-8" ?>
<Solution SolutionId="b3f346ba-5d7f-43fb-a6d4-78726db5d573" xmlns="http://schemas.microsoft.com/sharepoint/" DeploymentServerType="WebFrontEnd">
<Resources>
<Resource Location="SimpleFeature\Feature.xml"/>
<Resource Location="SimpleFeature\ProvisionedFiles.xml"/>
<Resource Location="SimpleFeature\yourfile.txt"/>
</Resources>
</Solution>
Solution.ddf
;*** Sample Source Code MakeCAB Directive file example
;
.OPTION EXPLICIT
.Set CabinetNameTemplate=SimpleSolution.wsp
.set DiskDirectoryTemplate=CDROM
.Set CompressionType=MSZIP
.Set UniqueFiles=off
.Set Cabinet=on
.Set DiskDirectory1=Packages
.Set MaxDiskSize=14576640
manifest.xml
.Set DestinationDir=SimpleFeature
SimpleFeature\Feature.xml
SimpleFeature\ProvisionedFiles.xml
SimpleFeature\yourfile.txt
As you can guess, this is just the tip of the iceberg - use google there is a lot of good posts out there