Ubuntu Packaging Guide - Changing the Original Tarball
- The authors only provide bzip2'ed source.
- Just bunzip2 the .tar.bz2 and gzip -9 the resulting tar.
- The md5sums of the .tar you provide and the original .tar must match!
- Eventually provide a get-orig-source rule in debian/rules that does this conversion automatically.
- Just bunzip2 the .tar.bz2 and gzip -9 the resulting tar.
- Directly imported from SVN
- Provide get-orig-source in debian/rules.
- Provide get-orig-source in debian/rules.
The following are not reasons to change the original tarball:
- Wrong Directory Layout
   [Note]   Â
  Â
dpkg-source is quite flexible and manages to produce the correct directory layout even if:- The directory inside the tarball is not named <upstream>-<version>.
- There is no subdirectory inside the tarball.
- The directory inside the tarball is not named <upstream>-<version>.
- Files need to be removed to keep the .diff.gz small (e.g., files created by autotools). Everything that needs to be deleted should be removed in the clean rule. Since the .diff.gz is created with diff -u, you will not see removed files in the .diff.gz.
- Files need to be modified. Files that need to be modified should to go into .diff.gz. That is its purpose!
- Wrong permissions on files. You can use debian/rules to do this.
   [Tip]   Â
  Â
What do I do with an .orig.tar.gz that already includes a debian/ dir?
Do not repackage it. You can ask the author(s) to delete the debian/ dir and provide a diff.gz instead. This makes it easier to review their work, and it separates packaging from program source.
   [Note]   Â
  Â
It is always a good idea to contact the program's author(s) and ask if you may correct autoconf issues, directory layout, an outdated Free Software Foundation address in COPYRIGHT files, or other things that are not specific to the packaging but would be convenient for you so you do not need to "patch" the source in .diff.gz.
Source...