]> git.proxmox.com Git - pve-omping.git/blob - Makefile
buildsys: improve clean
[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 DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
11 DBGDEB=${PACKAGE}-dbgsym_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
12
13 DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
14
15 DEBS=${DEB} ${DBGDEB}
16
17 all: ${DEBS}
18
19 .PHONY: ${PKGDIR}
20 ${PKGDIR}: ${PKGSRC}
21 rm -rf ${PKGDIR}
22 tar xf ${PKGSRC}
23 rm -rf ${PKGDIR}/debian
24 cp -a debian ${PKGDIR}/debian
25 echo "git clone git://git.proxmox.com/git/pve-omping.git\\ngit checkout ${GITVERSION}" > ${PKGDIR}/debian/SOURCE
26
27 .PHONY: deb
28 deb: ${DEBS}
29 ${DBGDEB}: ${DEB}
30 ${DEB}: ${PKGDIR}
31 cd ${PKGDIR}; dpkg-buildpackage -b -us -uc
32 lintian ${DEB}
33
34 .PHONY: dsc
35 dsc: ${DSC}
36 ${DSC}: ${PKGDIR}
37 cd ${PKGDIR}; dpkg-buildpackage -S -us -uc -d
38 lintian ${DSC}
39
40 .PHONY: upload
41 upload: ${DEBS}
42 tar cf - ${DEBS} | ssh repoman@repo.proxmox.com -- upload --product pve --dist buster --arch ${DEB_BUILD_ARCH}
43
44 distclean: clean
45
46 .PHONY: clean
47 clean:
48 rm -rf *~ *_${DEB_BUILD_ARCH}.deb *.changes *.dsc *.diff.gz *.buildinfo ${PKGDIR}
49
50 .PHONY: dinstall
51 dinstall: ${DEB}
52 dpkg -i ${DEB}