3 # Installs debian/changelog. If another filename is passed to it, installs
4 # that file as the upstream changelog.
6 # Looks at debian/control to determine if this is a native debian package,
7 # if so, the debian changelog is just installed as "changelog", and it is an
8 # error to specify an upstream changelog on the command line.
10 PATH=debian:$PATH:/usr/lib/debhelper
15 if isnative && [ "$UPSTREAM" ]; then
16 error "Cannot specify an upstream changelog for a native debian package."
20 CHANGELOG_NAME=changelog
22 CHANGELOG_NAME=changelog.Debian
25 for PACKAGE in $DH_DOPACKAGES; do
28 changelog=`pkgfile $PACKAGE changelog`
29 if [ ! "$changelog" ]; then
30 changelog=debian/changelog
33 if [ ! -d $TMP/usr/doc/$PACKAGE ]; then
34 doit "install -d $TMP/usr/doc/$PACKAGE"
36 doit "install -p -m644 $changelog $TMP/usr/doc/$PACKAGE/$CHANGELOG_NAME"
38 if [ "$UPSTREAM" ]; then
39 doit "install -p -m644 $UPSTREAM $TMP/usr/doc/$PACKAGE/changelog"