add debsource target
@@ -12,6 +12,7 @@ CLIENT = oidc-token
KEYCHAIN = oidc-keychain
PROMPT = oidc-prompt
+DEBIAN_RELEASE = 1
VERSION ?= $(shell cat VERSION)
# DIST = $(lsb_release -cs)
LIBMAJORVERSION ?= $(shell echo $(VERSION) | cut -d '.' -f 1)
@@ -677,12 +678,16 @@ remove: cleanobj cleanapi cleanpackage cleantest distclean
.PHONY: update_dch_version
update_dch_version: VERSION debian/changelog
- @perl -0777 -pi -e 's/(\().*?(\))/`echo -n "("; echo -n $(VERSION); echo -n ")"`/e' debian/changelog
+ @perl -0777 -pi -e 's/(\().*?(\))/`echo -n "("; echo -n $(VERSION)-$(DEBIAN_RELEASE); echo -n ")"`/e' debian/changelog
.PHONY: preparedeb
-preparedeb: update_dch_version
+preparedeb:
@quilt pop -a || true
- ( cd ..; tar czf ${PKG_NAME}_$(VERSION).orig.tar.gz --exclude-vcs --exclude=debian --exclude=.pc $(PKG_NAME))
+ ( cd ..; tar czf ${PKG_NAME}_${VERSION}.orig.tar.gz --exclude-vcs --exclude=debian --exclude=.pc ${PKG_NAME})
+
+.PHONY: debsource
+debsource: preparedeb
+ dpkg-source -b .
.PHONY: deb
deb: cleanapi create_obj_dir_structure update_dch_version preparedeb
