Question: Is there any other way of building the packages other than from Package manager console in AEM or CQ5 ?

Answer: 
In CQ 5.4 apart from the CRX package Manager console, there used to be another console within CQ, which can be used for the same purpose. But with CQ 5.5, the removed it, and made the CRX package manager the standard one for managing packages.

The package manager does expose an HTTP service interface, which allows managing packages using through Command Line Interface. You can use **curl** or any other command line clients to achieve this.

The [Package Manager Documentation](http://dev.day.com/docs/en/crx/current/how_to/package_manager.html#Package%20Manager%20HTTP%20Service%20API) provides the complete details on the various operations that are supported, the request and the response format, and some sample commands.

For e.g, the following is the curl command to create a new package.

```
curl -u <uid>:<pwd> -X POST
http://localhost:7402/crx/packmgr/service/.json/etc/packages/mycontent.zip?cmd=create 
-d packageName=<name> -d groupName=<name> 

```
You may also upload and install packages using maven crx plugin however this is just about upload and install programmatically <https://github.com/Cognifide/Maven-CRX-Plugin>