]> git.proxmox.com Git - pve-http-server.git/blobdiff - Makefile
bump version to 4.2-3
[pve-http-server.git] / Makefile
index bd4085b8453db0b50ab4c733a33fab60bdf22781..c8abf08b91a5eea77aa2fe7253c6e522030468d2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,36 +1,35 @@
-PACKAGE=libpve-http-server-perl
-PKGVER=1.0
-PKGREL=1
+include /usr/share/dpkg/pkg-info.mk
 
-DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb
+PACKAGE=libpve-http-server-perl
 
-DESTDIR=
+GITVERSION:=$(shell git rev-parse HEAD)
+BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
 
-PERL5DIR=${DESTDIR}/usr/share/perl5
-DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
+DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
 
-all: ${DEB}
+all:
 
 .PHONY: deb
-deb ${DEB}:
-       rm -rf build
-       rsync -a debian build
-       make DESTDIR=./build install
-       cd build; dpkg-buildpackage -rfakeroot -b -us -uc
+deb: ${DEB}
+${DEB}:
+       rm -rf ${BUILDDIR}
+       cp -a src ${BUILDDIR}
+       cp -a debian ${BUILDDIR}/
+       echo "git clone git://git.proxmox.com/git/pve-http-server\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
+       cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc
        lintian ${DEB}
 
-install:
-       install -d -m 755 ${PERL5DIR}/PVE/
-       install -m 0644 PVE/AsyncHTTPServer.pm ${PERL5DIR}/PVE
-
 .PHONY: upload
 upload: ${DEB}
-       tar cf - ${DEB} | ssh repoman@repo.proxmox.com upload
+       tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist bullseye
 
+.PHONY: clean distclean
 distclean: clean
+       ${MAKE} -C src $@
 
 clean:
-       rm -rf ./build *.deb *.changes
+       ${MAKE} -C src $@
+       rm -rf ${PACKAGE}-*/ *.deb *.changes *.buildinfo ${BTDIR} examples/simple-demo.lck
        find . -name '*~' -exec rm {} ';'
 
 .PHONY: dinstall