]> git.proxmox.com Git - pmg-log-tracker.git/blame - Makefile
rework build and packaging, add debian source package
[pmg-log-tracker.git] / Makefile
CommitLineData
e5f30e2e
TL
1include /usr/share/dpkg/pkg-info.mk
2include /usr/share/dpkg/architecture.mk
61b8223f 3
e5f30e2e
TL
4PACKAGE=pmg-log-tracker
5BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
61b8223f 6
e5f30e2e 7GITVERSION:=$(shell git rev-parse HEAD)
61b8223f 8
e5f30e2e
TL
9DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
10DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
839951d6 11
61b8223f 12all: ${DEB}
839951d6 13
e5f30e2e
TL
14.PHONY: ${BUILDDIR}
15${BUILDDIR}: src
16 rm -rf ${BUILDDIR} ${BUILDDIR}.tmp
17 cp -a src ${BUILDDIR}.tmp
18 cp -a debian ${BUILDDIR}.tmp/debian
19 echo "git clone git://git.proxmox.com/git/pmg-log-tracker.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}.tmp/debian/SOURCE
20 mv ${BUILDDIR}.tmp ${BUILDDIR}
839951d6 21
61b8223f 22.PHONY: deb
e5f30e2e
TL
23deb ${DEB}: ${BUILDDIR}
24 cd ${BUILDDIR}; dpkg-buildpackage -rfakeroot -b -us -uc
61b8223f
DM
25 lintian ${DEB}
26
e5f30e2e
TL
27.PHONY: dsc
28dsc ${DSC}: ${BUILDDIR}
29 cd ${BUILDDIR}; dpkg-buildpackage -rfakeroot -S -us -uc -d
30 lintian ${DSC}
31
61b8223f
DM
32.PHONY: dinstall
33dinstall: ${DEB}
34 dpkg -i ${DEB}
35
36.PHONY: upload
37upload: ${DEB} ${DBG_DEB}
e5f30e2e 38 tar cf - ${DEB} ${DBG_DEB}| ssh repoman@repo.proxmox.com -- upload --product pmg --dist stretch --arch ${DEB_BUILD_ARCH}
839951d6 39
c41a37e8
DM
40.PHONY: distclean
41distclean: clean
839951d6 42
c41a37e8
DM
43.PHONY: clean
44clean:
e5f30e2e 45 rm -rf *.deb ${PACKAGE}-* *.buildinfo *.changes *.dsc ${PACKAGE}_*.tar.gz
c41a37e8 46 find . -name '*~' -exec rm {} ';'