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