From 8fe603d49f44833cddcf5b13d5adeacdf3bc1ebb Mon Sep 17 00:00:00 2001 From: "R. Steve McKown" Date: Tue, 8 Dec 2009 13:17:00 -0700 Subject: [PATCH] Sign the debian apt package files and add new makefile targets. * Change the maintainer to 'TMI Packages '. * Sign the packages with the maintainer key. The current user must have the secret key for the maintainer. * Add a pbuilder makefile target that builds the package via pbuilder, pulls the results files to the build dir, and signs them. * Add a release makefile target that, with a properly configured ~/.dput.cf, will release the built package to the apt repository. --- Makefile | 25 ++++++++++++++++++++++--- debian.in/changelog | 2 +- debian.in/control | 4 ++-- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 0a6c30e..72c3495 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ # Change or override these values as necessary for each package release PKGVER = 0.11.2 -DEBRELEASE = 4tmi +DEBRELEASE = 5.2tmi # No need to change anything below this line @@ -21,6 +21,8 @@ ifeq (,$(REPOID)) $(error You much check the code out via svn, git-svn, or git) endif +USER := $(shell whoami) +REPOHOST := repo BUILD := build DEBDIST := $(shell lsb_release -cs) DEBVER := $(PKGVER)-$(DEBRELEASE) @@ -32,6 +34,8 @@ DEBSRC := $(PACKAGE)-$(PKGVER) ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) DEBFILE := $(BUILD)/$(PACKAGE)_$(DEBVER)_$(ARCH).deb DEBSRCFILE := $(BUILD)/$(PACKAGE)_$(DEBVER).dsc +CHANGESFILE := $(BUILD)/$(PACKAGE)_$(DEBVER)_$(ARCH).changes +UPLOADFILE := $(BUILD)/$(PACKAGE)_$(DEBVER)_$(ARCH).upload source: $(DEBSRCFILE) @@ -40,9 +44,24 @@ $(DEBSRCFILE): $(BUILD)/debian-stamp touch $@ +release: $(UPLOADFILE) +$(UPLOADFILE): $(CHANGESFILE) + : # Requires ~/.dput.cf and upload server configured properly + dput $(REPOHOST) $(CHANGESFILE) + + +pbuilder: $(CHANGESFILE) +$(CHANGESFILE): $(DEBSRCFILE) + : # Requires ~/.dput.cf and upload server configured properly + sudo pbuilder build $(DEBSRCFILE) + sudo mv /var/cache/pbuilder/result/$(PACKAGE)_$(DEBVER)* $(BUILD)/ + sudo chown $(USER) $(BUILD)/* + debsign $(CHANGESFILE) + + binary: $(DEBFILE) $(DEBFILE): $(BUILD)/debian-stamp - cd $(BUILD)/$(DEBSRC) && dpkg-buildpackage -sa -us -uc + cd $(BUILD)/$(DEBSRC) && dpkg-buildpackage -sa $(BUILD)/src-stamp: Makefile.dkms dkms.conf $(wildcard src/*) @@ -92,4 +111,4 @@ debug: @echo "DEBSRCFILE = $(BUILD)/$(PACKAGE)_$(DEBVER).dsc" -.PHONY: clean binary source configure +.PHONY: clean binary source configure pbuilder release diff --git a/debian.in/changelog b/debian.in/changelog index 6b0b8bc..ef28246 100644 --- a/debian.in/changelog +++ b/debian.in/changelog @@ -2,4 +2,4 @@ xxPACKAGExx (xxDEBVERxx) xxDEBDISTxx; urgency=low * Auto packaged - -- R. Steve McKown xxRFC822DATExx + -- TMI Packages xxRFC822DATExx diff --git a/debian.in/control b/debian.in/control index 062f77e..7cdc3e0 100644 --- a/debian.in/control +++ b/debian.in/control @@ -1,9 +1,9 @@ Source: xxPACKAGExx Section: devel Priority: optional -Maintainer: R. Steve McKown +Maintainer: TMI Packages Standards-Version: 3.7.2.0 -Build-Depends: dpkg-dev (>= 1.13.9) +Build-Depends: dpkg-dev (>= 1.13.9), lsb-release Package: xxPACKAGExx Architecture: all -- 2.39.2