That's why I qualified it "according to packaging guidelines".
And I don't want to comply with packaging guidelines because I want to get it into the upstream repo; no, I want it compliant so it is not broken at upgrade time and I don't want to have to solve several problems at once at the most inconvenient time.
With rpm it is both easy and piecemeal - you don't have to have the entire knowledge in your head upright, you can improve it continuosly. You start with spec file and rpmbuild, then find out about rpmlint, then you will find out about mock (so you can build package for Fedora-any version and CentOS-anyversion from any distribution, including Ubuntu or Debian, inside chroot or container) to koji (full blown distro-scale build system).
I have a script which does various things with git to get a copy of the latest code, tag it, then runs something like
fakeroot dpkg-deb --build ./$packageName/src $packageName.deb
In that src file are things like "usr/whatver", "opt/whatever", "etc/whatever" and "DEBIAN"
In DEBIAN is a really simply control file and sometimes some scripts to do things on install.
Getting a package approved by the debian maintainers is an issue if you don't follow the guidelines (and lintian will help) - just like getting a package approved by the redhat maintainers, but to make your own deb is barely harder than creating a tarball.