Accidentally making a Debian-native package
It is easy to make a Debian-native package if you are not careful. See the Glossary entry for why this is usually a bad idea.
We will imagine that you have created a package, and you have been told it is Debian-native and been asked to correct it.
The first thing to do is to check your ?VersionNumber,
This should have a [[Glossary/DebianVersion[[ part, i.e. a -1 part
for a new package. If not the edit debian/changelog and change the
number in brackets on the first line to have -1 on the end.
The usual reason why a native package is created by mistake is
because dpkg-dev cannot find the ?UpstreamTarball when
it is building your package. Imagine you are packaging scruffy, version
1.1. It is a first upload so the version number will be 1.1-1 with the
DebianVersion added. You will then be working in
scruffy-1.1/
And have your packaging in the debian subdirectory.
You should make sure the ?UpstreamTarball is named correctly and in the correct location.
First move to the parent directory of scruffy-1.1, and copy
the tarball to your current directory. Then rename it so that
it matches
<package>_<upstream-version>.orig.tar.gz
in this case that would be
scruffy_1.1.orig.tar.gz
Now change back to the scruffy-1.1 directory, and build the package
again using dpkg-buildpackage. Then look at the file
../<package>_<full-version>.dsc
in this case
../scruffy_1.1-1.dsc
and it should contain a line that looks like
2b9b9dda414846c3e1df5f9884319d49 214079 <package>_<upstream-version>.orig.tar.gz
5f49d98764a6b2358196eb36313932f4 28471 <package>_<full-version>.diff.gz
i.e. a line for the .orig.tar.gz and one for the .diff.gz. If you only
have a line for .tar.gz then you have created a native package again,
and you should check the instructions above again.