chiark / gitweb /
Debian build: ./newVersion updates debian/changelog too. master
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 26 Sep 2015 01:41:39 +0000 (01:41 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 5 Oct 2015 13:20:49 +0000 (14:20 +0100)
Also, tidy up the debian/changelog.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/.gitignore
debian/changelog
newVersion

index 5145e9a3512bc8ecde09b29b723b6a70eb883292..9b065a4aeac244bf23549a6ac0c296d0c244dbf8 100644 (file)
@@ -8,3 +8,4 @@ libwiringpi-dev
 files
 *.postinst.debhelper
 *.postrm.debhelper
+changelog.new
index e784367be0596344e2e3be0e03a5e42962540501..6d579fecd2e220fc06caf69aa9b965d7bd35b718 100644 (file)
@@ -1,4 +1,4 @@
-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'
@@ -27,7 +27,7 @@ wiringpi (2.28~iwj1) unstable; urgency=medium
   * ./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
 
index bab6dc581bf96b322adbad8290fa065040399034..e89ae7e471b63d5bb38898b8aa02de3287c66a71 100755 (executable)
@@ -41,3 +41,22 @@ Description: The wiringPi libraries, headers and gpio command
   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