]>
Commit | Line | Data |
---|---|---|
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 | |
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: dsc | |
30 | dsc: ${DSC} | |
31 | ${DSC}: ${BUILDDIR} | |
32 | cd ${BUILDDIR}; dpkg-buildpackage -S -uc -us -d | |
33 | lintian ${DSC} | |
34 | ||
35 | .PHONY: submodule | |
36 | submodule: | |
37 | test -e edk2/Maintainers.txt || git submodule update --init --recursive | |
38 | ||
39 | ${SRCDIR}/Readme.md: submodule | |
40 | ||
41 | .PHONY: update_modules | |
42 | update_modules: submodule | |
43 | git submodule foreach 'git pull --ff-only origin master' | |
44 | ||
45 | .PHONY: upload | |
46 | upload: ${DEB} | |
47 | tar cf - ${DEB}|ssh -X repoman@repo.proxmox.com -- upload --product pve --dist buster | |
48 | ||
49 | .PHONY: distclean clean | |
50 | distclean: clean | |
51 | clean: | |
52 | rm -rf *~ debian/*~ *.deb ${PACKAGE}-*/ *.tar.gz *.changes *.dsc *.buildinfo | |
53 | ||
54 | .PHONY: dinstall | |
55 | dinstall: ${DEB} | |
56 | dpkg -i ${DEB} |