3 # Install files from debian/ into the package's DEBIAN directory.
5 PATH=debian:$PATH:/usr/lib/debhelper
8 for PACKAGE in $DH_DOPACKAGES; do
12 if [ ! -d $TMP/DEBIAN ]; then
13 doit "install -o root -g root -d $TMP/DEBIAN"
16 # Install debian install scripts.
17 # If any .debhelper files exist, add them into the scripts.
18 for file in postinst preinst prerm postrm; do
19 if [ -f debian/$EXT$file ]; then
20 # Add this into the script, where it has #DEBHELPER#
21 if [ -f debian/$EXT$file.debhelper ]; then
22 complex_doit "perl -pe 's~#DEBHELPER#~qx{cat debian/$EXT$file.debhelper}~eg' < debian/$EXT$file > $TMP/DEBIAN/$file"
23 doit "chown root.root $TMP/DEBIAN/$file"
24 doit "chmod 755 $TMP/DEBIAN/$file"
26 doit "install -o root -g root -p debian/$EXT$file $TMP/DEBIAN/$file"
29 # Auto-generate script header and add .debhelper
31 if [ -f debian/$EXT$file.debhelper ]; then
32 complex_doit "echo '#!/bin/sh -e' > $TMP/DEBIAN/$file"
33 complex_doit "cat debian/$EXT$file.debhelper >> $TMP/DEBIAN/$file"
34 doit "chown root.root $TMP/DEBIAN/$file"
35 doit "chmod 755 $TMP/DEBIAN/$file"
40 # Install non-executable files
41 for file in shlibs conffiles; do
42 if [ -f debian/$EXT$file ]; then
43 doit "install -o root -g root -m 644 -p debian/$EXT$file $TMP/DEBIAN/$file"