to build a source package

Signed-off-by: Fabian Grünbichler <[email protected]>
---
 Makefile | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index d281712..d5b9c5f 100644
--- a/Makefile
+++ b/Makefile
@@ -36,21 +36,32 @@ libsam-dev_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
 libtotem-pg-dev_${CSVERSION}-${CSRELEASE}_${ARCH}.deb \
 libvotequorum-dev_${CSVERSION}-${CSRELEASE}_${ARCH}.deb
 
+DSC=corosync-pve_${CSVERSION}-${CSRELEASE}.dsc
+
 all: ${DEBS}
        echo ${DEBS}
 
+${CSDIR}: ${CSSRC} patches changelog.Debian
+       rm -rf $@ [email protected]
+       mkdir [email protected]
+       tar -C [email protected] --strip-components=1 -xf ${CSSRC}
+       mv [email protected]/debian/changelog [email protected]/debian/changelog.org
+       cat changelog.Debian [email protected]/debian/changelog.org > 
[email protected]/debian/changelog
+       cd [email protected]; ln -s ../patches patches
+       cd [email protected]; quilt push -a
+       cd [email protected]; rm -rf .pc ./patches
+       mv [email protected] $@
+
 .PHONY: deb
 deb: ${DEBS}
-${DEBS}: ${CSSRC}
-       rm -rf ${CSDIR}
-       tar xf ${CSSRC}
-       mv ${CSDIR}/debian/changelog ${CSDIR}/debian/changelog.org
-       cat changelog.Debian ${CSDIR}/debian/changelog.org > 
${CSDIR}/debian/changelog
-       cd ${CSDIR}; ln -s ../patches patches
-       cd ${CSDIR}; quilt push -a
-       cd ${CSDIR}; rm -rf .pc ./patches
+${DEBS}: ${CSDIR}
        cd ${CSDIR}; dpkg-buildpackage -b -us -uc
 
+.PHONY: dsc
+dsc: ${DSC}
+${DSC}: ${CSDIR}
+       cd ${CSDIR}; dpkg-buildpackage -S -us -uc -d -nc
+
 .PHONY: download
 download:
        rm -rf ${CSSRC} ${CSSRC}.tmp ${CSDIR}
-- 
2.19.1


_______________________________________________
pve-devel mailing list
[email protected]
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to