]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
Fixed changelog for Ubuntu PPAs
authorStephen Bates <stephen.bates@pmcs.com>
Thu, 24 Dec 2015 17:00:34 +0000 (10:00 -0700)
committerStephen Bates <stephen.bates@pmcs.com>
Thu, 24 Dec 2015 17:00:34 +0000 (10:00 -0700)
The changelog generated in the nvme-cli Makefile was not generic
enough for PPAs which build for multiple versions of Ubuntu. This is
controlled via the NVME_DPKG_VERSION variable that can be passed into
the Makefile.

Makefile

index c20a4ecd9b140c16e8165c851bb35d7008199dea..d0c0ce4436716e2a204f8821f3ca7ce8219d02ef 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -28,6 +28,8 @@ NVME-VERSION-FILE: FORCE
 -include NVME-VERSION-FILE
 override CFLAGS += -DNVME_VERSION='"$(NVME_VERSION)"'
 
+NVME_DPKG_VERSION=1~`lsb_release -sc`
+
 nvme: nvme.c ./linux/nvme.h argconfig.o suffix.o common.o NVME-VERSION-FILE
        $(CC) $(CPPFLAGS) $(CFLAGS) nvme.c $(LDFLAGS) -o $(NVME) argconfig.o suffix.o common.o
 
@@ -103,7 +105,7 @@ dist-orig: ../nvme-cli_$(NVME_VERSION).orig.tar.gz
 # determine the package version.
 deb-changelog:
        printf '%s\n\n  * Auto-release.\n\n %s\n' \
-          "nvme-cli ($(NVME_VERSION)-1~`lsb_release -sc`) `lsb_release -sc`; urgency=low" \
+          "nvme-cli ($(NVME_VERSION)-$(NVME_DPKG_VERSION)) `lsb_release -sc`; urgency=low" \
           "-- $(AUTHOR)  `git log -1 --format=%cD`" \
          > debian/changelog
 
@@ -113,8 +115,9 @@ deb: deb-changelog dist-orig
 # After this target is build you need to do a debsign and dput on the
 # ../<name>.changes file to upload onto the relevant PPA. For example:
 #
-#  > make AUTHOR='First Last <first.last@company.com>' deb-ppa
-#  > debsign <name>/changes
+#  > make AUTHOR='First Last <first.last@company.com>' \
+#        NVME_DPKG_VERSION='0ubuntu1' deb-ppa
+#  > debsign <name>.changes
 #  > dput ppa:<lid>/ppa <name>.changes
 #
 # where lid is your launchpad.net ID.