Imported Upstream version 3.3.2
[debian/amanda] / packaging / deb / buildpkg
index ef937084b9275e9dc15dca93354fb3c74dddc42e..69889a9c7387aa6db6488fe333d800f7a6cb6464 100755 (executable)
@@ -40,6 +40,9 @@ then
     exit 1
 fi
 
+# Until we get package revisioning in community.
+[ -f "PKG_REV" ] || echo "1" > PKG_REV
+
 #### Build functions
 
 do_substitute() {
@@ -48,7 +51,14 @@ do_substitute() {
     # dpkg assumes that packages will have the same name on all releases and
     # that apt will prevent users from downloading the wrong build.  We want
     # this information helpfully obvious since we can't rely on apt.
-    /usr/bin/perl packaging/common/substitute.pl packaging/deb/changelog.src packaging/deb/changelog
+    file_list="packaging/deb/changelog \
+        packaging/deb/postinst \
+        packaging/deb/postrm \
+        packaging/deb/preinst"
+    for file in ${file_list}; do
+        /usr/bin/perl packaging/common/substitute.pl \
+            ${file}.src ${file} || exit 1
+    done
 }
 
 do_resources() {