How to build .deb file which has my changes

i’m totally new to this just exploring new things

how can i build .deb file which has my code changes

so that if i install .deb file and configure all stuffs i should be able to use my changes

Over at Graylog we are using fpm with some magic.