After 3 days of struggle, I am able to find a way for auto update the package. Not sure whether this is the correct way. But it works for my scenario.
Updateservers
Assume my component name is com_mycomponent
and I got the mycompnent.xml
(manifest) file. In that file update the servers as below. I put the below code after the adminstration
tag.
<updateservers>
<server type="extension" priority="2" name="My Package Updates">http://example.com/update_package.xml</server>
</updateservers>
Yes, I use the component's manifest file to update my package
Create the package
-- pck_mypackage
-- com_mycomponent.zip
-- lib_mylibrary.zip
-- lib_myplugin.zip
-- script.php
-- pck_mypackage.xml
update_package.xml
<updates>
<update>
<name>My Package Update</name>
<description>Some description</description>
<element>pkg_mypackage</element>
<client>0</client>
<type>package</type>
<version>1.0.1</version>
<infourl title="Some title">http://www.example.com/</infourl>
<downloads>
<downloadurl type="full" format="zip">http://example.com/pkg_mypackage_101.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<targetplatform name="joomla" version="3"/>
</update>
</updates>
Thats all. The updater now looks for the update for the component and actually installs the package.