]> git.proxmox.com Git - pve-edk2-firmware.git/blob - Makefile
buildsys: use dpkg-dev makefile helpers for pkg info
[pve-edk2-firmware.git] / Makefile
1 include /usr/share/dpkg/pkg-info.mk
2
3 PACKAGE=pve-edk2-firmware
4
5 SRCDIR=edk2
6 BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
7
8 GITVERSION:=$(shell git rev-parse HEAD)
9
10 DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
11 #DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc # FIXME: TODO
12
13 all: ${DEB}
14 @echo ${DEB}
15
16 ${BUILDDIR}: ${SRCDIR}/Readme.md
17 rm -rf ${BUILDDIR}
18 cp -rpa ${SRCDIR} ${BUILDDIR}
19 cp -a debian ${BUILDDIR}
20 echo "git clone git://git.proxmox.com/git/pve-edk2-firmware.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/debian/SOURCE
21
22 .PHONY: deb
23 deb: ${DEB}
24 ${DEB}: ${BUILDDIR}
25 cd ${BUILDDIR}; dpkg-buildpackage -b -uc -us
26 lintian ${DEB}
27 @echo ${DEB}
28
29 .PHONY: submodule
30 submodule:
31 git submodule update --init --recursive
32
33 ${SRCDIR}/Readme.md: submodule
34
35 .PHONY: update_modules
36 update_modules: submodule
37 git submodule foreach 'git pull --ff-only origin master'
38
39 .PHONY: upload
40 upload: ${DEB}
41 tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pve --dist stretch
42
43 .PHONY: distclean clean
44 distclean: clean
45 clean:
46 rm -rf *~ debian/*~ *.deb ${BUILDDIR} *.changes *.dsc *.buildinfo
47
48 .PHONY: dinstall
49 dinstall: ${DEB}
50 dpkg -i ${DEB}