[pve-devel] [PATCH common 1/8] build: split deb target into deb and src
Fabian Grünbichler
f.gruenbichler at proxmox.com
Wed Oct 17 14:36:02 CEST 2018
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
Makefile | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index d9d152e..dec0790 100644
--- a/Makefile
+++ b/Makefile
@@ -9,32 +9,46 @@ GITVERSION:=$(shell git rev-parse HEAD)
BUILDDIR ?= build
DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
+DSC=${PACKAGE}_${VERSION}-${PKGREL}.dsc
+TARGZ=${PACKAGE}_${VERSION}-${PKGREL}.tar.gz
-all: ${DEB}
+all:
+ ${MAKE} -C src
.PHONY: dinstall
dinstall: deb
dpkg -i ${DEB}
-
-.PHONY: deb
-deb ${DEB}: check
+${BUILDDIR}: src debian
rm -rf ${BUILDDIR}
- rsync -a src/ ${BUILDDIR}
- rsync -a debian/ ${BUILDDIR}/debian
+ rsync -a * ${BUILDDIR}
echo "git clone git://git.proxmox.com/git/pve-common.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/debian/SOURCE
+
+.PHONY: deb
+deb: ${DEB}
+${DEB}: ${BUILDDIR}
cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc
lintian ${DEB}
+.PHONY: dsc
+dsc ${TARGZ}: ${DSC}
+${DSC}: ${BUILDDIR}
+ cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d -nc
+ lintian ${DSC}
+
.PHONY: clean distclean
distclean: clean
clean:
- rm -rf *~ *.deb *.changes ${BUILDDIR} *.buildinfo
+ rm -rf *~ *.deb *.changes ${BUILDDIR} *.buildinfo *.dsc *.tar.gz
.PHONY: check
check:
$(MAKE) -C test check
+.PHONY: install
+install:
+ ${MAKE} -C src install
+
.PHONY: upload
upload: ${DEB}
tar cf - ${DEB}|ssh -X repoman at repo.proxmox.com -- upload --product pve,pmg --dist stretch
--
2.19.1
More information about the pve-devel
mailing list