Login to admin and go to System -> Magento Connect -> Package Extensions
Step 1. Package Info
Find the details of each and every fields on this page
Name: YourNamespace_YourModuleName
Channel: connect.magentocommerce.com/community (If you are using Magento version 1.4 and below)
Channel: community (If you are using Magento version 1.5 and above)
Supported releases: Pre-1.5.0.0 (Extension will be installed in all versions of Magento)
Supported releases: 1.5.0.0 & later (Extension will only support 1.5 and higher versions of Magento)
Summary : Fill the Extension Summary
Description : Fill the Extension Full Description
License : OSL (If it is Opensource)
Step 2. Release Info
Release Version : Your module’s version as putted in YourNamespace/YourModule/etc/config.xml
Release Stability : Select you Release Stability Development,Alpha,Beta and Stable.
Notes : Fill your release notes in it.
Step 3. Authors
Name : Your Name
User : Your User Name
Email : Your Email Address
Step 4. Dependencies
Just add minimum and maximum PHP Version
Minimum PHP Version : Fill the Minimum PHP version which is supported by the extension.
Maximum PHP Version : Fill the Maximum PHP version which is supported by the extension.
Step 5. Contents
Here are the Path is relative to Target directory.
Magento Local module file is relative to app/code/local/
Magento Community module file is relative to app/code/community/
Magento Core team module file is relative to app/code/core/
Magento User Interface (layouts, templates) is relative to app/design/
Magento Global Configuration is relative to app/etc/
Magento PHP Library file is relative to lib/
Magento Locale language file is relative to app/locale/
Magento Media library is relative to media/
Magento Theme Skin (Images, CSS, JS) is relative to skin/
Magento Other web accessible file is relative to /
Magento PHPUnit test is relative to tests/
Magento other is relative to /
You can find path-target relationship in your magento installation file as well. It is located in downloader/target.xml file.
click on the Save Data and Create Package.
Now your package is ready and you can find the package file var/pear OR var/connect directory.