Also, tidy up the debian/changelog.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
files
*.postinst.debhelper
*.postrm.debhelper
+changelog.new
-wiringpi (2.28~iwj1) unstable; urgency=medium
+wiringpi (2.28-1) RASPBIAN; urgency=medium
* Make `./build debian' do a true Debian source package based
build; provide the old style build as `./build debian-template'
* ./newVersion updates debian/changelog too.
* Remove the +x bit from maxdetect.[ch] and examples/PiFace/ladder.c.
- --
+ -- Ian Jackson <ijackson@chiark.greenend.org.uk> Sat, 26 Sep 2015 02:53:46 +0100
wiringpi (2.26~iwj) rpi-unstable; urgency=low
Libraries to allow GPIO access on a Raspberry Pi from C and C++
programs as well as from the command-line
EOF
+
+changelog=$(dpkg-parsechangelog)
+olddebversion=$(printf "%s" "$changelog" |
+ sed -n '/^Version: / { s/^Version: //; p; q }')
+newversion=`cat VERSION`
+
+if [ x"$olddebversion" != x"$newversion" ]; then
+ clog=debian/changelog
+ datestamp=$(date -R)
+ cat <<END - $clog >$clog.new
+wiringpi ($newversion) RASPBIAN; urgency=medium
+
+ * New upstream version
+
+ -- Gordon Henderson <projects@drogon.net> $datestamp
+
+END
+ mv -f $clog.new $clog
+fi