How do I create stand alone packages from ubuntu repository
Is it possible to create a stand alone deb packages by merging dependancies without manual repacking.??
I've looked at this question but it doesn't really answer what I'm trying to achieve above.
if possible how to do it?
update 1
No tools available yet(?) So what about creating new deb package containing all packages which will copy dependencies to the cache and executing main package. Is it possible?
update 2
Above method appears to be impossible because dpkg cant handle more than one operation at a time. Some scripts may can do it
update 3
this tool is very helpful but it currently wont support oneric and above still waiting for more generic tool
Thanks in advance
Use super deb creator. You can make stand alone packages for upto Ubuntu 11.04. For more details check the official website. http://hacktolive.org/wiki/SuperDeb_Creator
No. If you want a single package without dependencies, you will need to repackage it yourself.
To understand how packages work you can read the debian packaging guide.
If all of these things are already in the Ubuntu archive, then all you really want is a meta package that causes their installation, right?
You really just need to create a nearly empty package with dh_make. Tell it you want a single binary, and a native package. In an empty directory:
dh_make --native --indep --packagename --defaultless your-thing
Then edit debian/control, and in the binary package section (the second one) Add all the packages you want installed to the Depends: section, separated by commas.
Then build the package with
debuild binary
If you'd like to upload it to a PPA on Launchpad so others can easily get it:
dch --release --distribution oneiric
debuild -S
Of course, change oneiric to whatever you wish to package this for. Then in the directory above you should have
your-thing_1.0_source.changes
After you've created a PPA just do
dput ppa:yourusername/ppaname your-thin_1.0_source.changes
And then anybody who installs that package will also download and install all of the other bits depended on.
If I was going to have a hack at this, I'd do the following:
- Download and extract all the packages
- Keep the main package's copy of the DEBIAN folder, put the others' to one side
- Alter the
DEBIAN/control
file so- List each package you're providing in the
Provides
line - Add
Conflicts
entries for the packages you're replacing - Remove the dependencies from the
Dependencies
line
- List each package you're providing in the
- Alter the
postinst
andpreinst
,prerm
andpostrm
scripts so your new copy handles things for all the packages. This isn't simple because you'll need to understand what each package is doing at each step. - Repackage the whole thing back up again so you have all the files and the new DEBIAN files.
At the end you should be left with something you can install but it's not great. You're going to have to manually repeat those steps any time one of the original packages gets an update.
The systems that keep their original packaging systems are much better. You'd even be better just shipping separate debs around. It'll take less time and will be more robust.
Of course it's possible, but I'm not aware of any tools that will do it for you. So manual repackaging is the way to go.