]> git.proxmox.com Git - pve-omping.git/blob - Makefile
buildsys: use dpkg-dev makefile helpers for pkg info
[pve-omping.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2 include /usr/share/dpkg/architecture.mk
3
4 PACKAGE=omping
5 PKGDIR=${PACKAGE}-${DEB_VERSION_UPSTREAM}
6 PKGSRC=${PACKAGE}_${DEB_VERSION_UPSTREAM}.orig.tar.gz
7
8 GITVERSION:=$(shell cat .git/refs/heads/master)
9
10 DEBS= ${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
11
12 all: ${DEBS}
13
14 ${DEBS}: ${PKGSRC}
15 rm -rf ${PKGDIR}
16 tar xf ${PKGSRC}
17 rm -rf ${PKGDIR}/debian
18 cp -a debian ${PKGDIR}/debian
19 echo "git clone git://git.proxmox.com/git/pve-omping.git\\ngit checkout ${GITVERSION}" > ${PKGDIR}/debian/SOURCE
20 cd ${PKGDIR}; dpkg-buildpackage -b -us -uc
21
22 .PHONY: upload
23 upload: ${DEBS}
24 tar cf - ${DEBS} | ssh repoman@repo.proxmox.com -- upload --product pve --dist buster --arch ${DEB_BUILD_ARCH}
25
26 distclean: clean
27
28 .PHONY: clean
29 clean:
30 rm -rf *~ *_${DEB_BUILD_ARCH}.deb *.changes *.dsc *.buildinfo ${PKGDIR}
31
32 .PHONY: dinstall
33 dinstall: ${DEBS}
34 dpkg -i ${DEBS}