Take the 2-minute tour ×  I want to start sharing .deb files
that automatically add new repos to an Ubuntu installation (like
the ones present in puppetlabs.com).  How can I do that?
share|improve this question  1 Answer 1  You could add a
postinst script to your package:  Broadly speaking the preinst
[script] is called before (a particular version of) a package is
unpacked, and the postinst afterwards... The postinst should
still attempt any actions for which its dependencies are
required, since they will normally be available, but consider
the correct error handling approach if those actions fail.   An
example  The Opera browser is adding itself to the
/etc/apt/sources.list.d/opera.list with the postinst script:
http://pastebin.com/u6SR6krY  share|improve this answer I think
it's maybe a little too much for my current knowledge. But
thanks for the quick answer :) –  Tiago Carrondo Sep 30 '12 at
10:14 @user26687 The complete packaging guide does not exist. – 
Archisman Panigrahi Sep 2 '13 at 3:35  Your Answ