Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to add a 'postinst' script to my debian package to clean up something a previous version may have left behind.

I've simply created a 'postinst' file in the debian/ directory, but the file is not present in the .deb file.

The permissions:

-rwxrwxr-x 1 kp kp 354 Sep 16 20:00 postinst*

The content:

#!/bin/sh

set -e
set -x

...
share|improve this question
    
can you post the file permissions for the postinst file and the contents of postinst –  hbdgaf Sep 19 '11 at 15:11

1 Answer 1

up vote 3 down vote accepted

You need to copy the postinst file (and other similar files) to the package staging directory. If you use dh_make, this is performed by dh_installdeb, which is of course included in dh install. If you're doing everything manually. copy the file to debian/tmp/DEBIAN/ where debian/tmp is the staging directory.

share|improve this answer
    
I didn't have the 'dh_installdeb' in my debian/rules file. –  Kristof Provost Sep 20 '11 at 8:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.