X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;ds=sidebyside;f=Makefile;h=c5a5967bb3f35c527dc72400c80aabe91fcf9df9;hb=HEAD;hp=7eaa8da3a390fb41ed8d10268fca6d125471ad7b;hpb=a2dd551b0a80f4b59ba15e53d435db2cf5d2a4b9;p=pve-guest-common.git diff --git a/Makefile b/Makefile index 7eaa8da..abf2b0d 100644 --- a/Makefile +++ b/Makefile @@ -1,44 +1,47 @@ -PACKAGE=libpve-guest-common-perl -PKGVER=2.0 -PKGREL=14 +include /usr/share/dpkg/pkg-info.mk -DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb +PACKAGE=libpve-guest-common-perl -DESTDIR= +DEB=$(PACKAGE)_$(DEB_VERSION)_all.deb +DSC=$(PACKAGE)_$(DEB_VERSION).dsc -PERL5DIR=${DESTDIR}/usr/share/perl5 -DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE} +BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION) all: +$(BUILDDIR): + rm -rf $@ $@.tmp + cp -a src $@.tmp + cp -a debian $@.tmp/ + echo "git clone git://git.proxmox.com/git/pve-guest-common.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE + mv $@.tmp $@ + .PHONY: deb -deb: ${DEB} -${DEB}: - rm -rf build - rsync -a * build - cd build; dpkg-buildpackage -b -us -uc - lintian ${DEB} - -install: PVE - install -d ${PERL5DIR}/PVE - install -m 0644 PVE/GuestHelpers.pm ${PERL5DIR}/PVE/ - install -m 0644 PVE/AbstractConfig.pm ${PERL5DIR}/PVE/ - install -m 0644 PVE/AbstractMigrate.pm ${PERL5DIR}/PVE/ - install -m 0644 PVE/ReplicationConfig.pm ${PERL5DIR}/PVE/ - install -m 0644 PVE/ReplicationState.pm ${PERL5DIR}/PVE/ - install -m 0644 PVE/Replication.pm ${PERL5DIR}/PVE/ - install -d ${PERL5DIR}/PVE/VZDump - install -m 0644 PVE/VZDump/Plugin.pm ${PERL5DIR}/PVE/VZDump/ +deb: $(DEB) +$(DEB): $(BUILDDIR) + cd $(BUILDDIR); dpkg-buildpackage -b -us -uc + lintian $(DEB) + +.PHONY: dsc +dsc: + $(MAKE) $(DSC) + lintian $(DSC) + +$(DSC): $(BUILDDIR) + cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d -nc + +sbuild: $(DSC) + sbuild $(DSC) .PHONY: upload -upload: ${DEB} - tar cf - ${DEB} | ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch +upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION) +upload: $(DEB) + tar cf - $(DEB) | ssh repoman@repo.proxmox.com -- upload --product pve --dist $(UPLOAD_DIST) distclean: clean - clean: - rm -rf ./build *.deb *.changes *.buildinfo + rm -rf $(PACKAGE)-[0-9]*/ *.deb *.dsc *.changes *.buildinfo *.build $(PACKAGE)*.tar* .PHONY: dinstall -dinstall: ${DEB} - dpkg -i ${DEB} +dinstall: $(DEB) + dpkg -i $(DEB)