How to create a deb package that installs a series of files

Posted by fossfreedom on Ask Ubuntu See other posts from Ask Ubuntu or by fossfreedom
Published on 2012-06-04T13:42:11Z Indexed on 2012/06/04 22:47 UTC
Read the original article Hit count: 300

Filed under:
|

I would like to create a brand new deb package to install series of files. If at all possible, I would like to untar the folder containing these files as part of the installation into a known folder location. Failing that, some knowledge how to package the source folders and files would be very useful.

Question is - is this possible and if so - how?

Lets give an example:

~/mypluginfolder/ contains the files x, y, a subfolder called abc and inside that another file called z.

I want to tar this folder: tar -cvf myfiles.tar ~/mypluginfolder

I presume my debian package would look like

myfiles.tar.gz
myfiles+ppafoss_0.1-1/
   myfiles.tar
   DEBIAN
      changelog, compat, control, install, rules source

Is it possible to somehow untar myfiles.tar to a known folder location for example

/usr/share/rhythmbox/plugins/

Thus the final result would be:

/usr/share/rhythmbox/plugins/mypluginfolder
/usr/share/rhythmbox/plugins/mypluginfolder\x
/usr/share/rhythmbox/plugins/mypluginfolder\y
/usr/share/rhythmbox/plugins/mypluginfolder\abc\z

If - presuming launchpad needs source, advice is sought as to where I should drop the source folders and files into the deb package structure.


This will eventually will become a series of individual launchpad PPA packages.

What I prefer (but may not be able to achieve...) is to keep my packaging to a minimum - create a series of packages from a template and adjust the bare minimum (changelog etc + the tar file/file & folder structure).

© Ask Ubuntu or respective owner

Related posts about package-management

Related posts about deb