Create Extension Package In Magento

Suppose you have built a custom Magento extension and you want to publish this extension on the Magento Connect then it is very important to create the package of it, because Magento Connect only accept the Extension as Package. Here in this post I am trying to describe how to create the extension package so that we can publish it on the Magento Connect.

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: (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- (Extension will be installed in all versions of Magento)
Supported releases: & 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.