]>
Commit | Line | Data |
---|---|---|
eb39fafa DC |
1 | include /usr/share/dpkg/pkg-info.mk |
2 | ||
3 | PACKAGE=pve-eslint | |
4 | ||
5 | GITVERSION:=$(shell git rev-parse HEAD) | |
6 | BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM} | |
7 | ||
8 | DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb | |
382381f7 | 9 | DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc |
eb39fafa DC |
10 | |
11 | SRCDIR=src | |
12 | UPSTREAM=eslint | |
6f036462 | 13 | UPSTREAMTAG=v7.12.1 |
eb39fafa DC |
14 | BUILDSRC=${UPSTREAM}-${UPSTREAMTAG} |
15 | ||
16 | all: ${DEB} | |
17 | @echo ${DEB} | |
18 | ||
382381f7 TL |
19 | .PHONY: dsc deb builddir |
20 | ||
21 | ${BUILDDIR}: builddir | |
22 | builddir: ${SRCDIR} | |
eb39fafa DC |
23 | rm -rf ${BUILDDIR} |
24 | mkdir ${BUILDDIR} | |
25 | cp -a debian ${BUILDDIR}/ | |
26 | cp -a ${SRCDIR}/* ${BUILDDIR}/ | |
27 | echo "git clone git://git.proxmox.com/git/pve-eslint.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/debian/SOURCE | |
382381f7 TL |
28 | |
29 | ||
30 | dsc: ${DSC} | |
31 | ${DSC}: builddir | |
32 | cd ${BUILDDIR}; dpkg-buildpackage -S -uc -us | |
33 | lintian ${DSC} | |
34 | ||
35 | deb: ${DEB} | |
36 | ${DEB}: builddir | |
37 | cd ${BUILDDIR}; dpkg-buildpackage -b -uc -us | |
eb39fafa DC |
38 | lintian ${DEB} |
39 | @echo ${DEB} | |
40 | ||
41 | .PHONY: download | |
42 | download: | |
43 | rm -rf ${UPSTREAM}.tmp ${UPSTREAM} | |
44 | git clone -b ${UPSTREAMTAG} --depth 1 https://github.com/eslint/eslint ${UPSTREAM}.tmp | |
45 | rm -rf ${UPSTREAM}.tmp/.git | |
46 | find ${UPSTREAM}.tmp/ -type f -name '.gitignore' -delete | |
47 | mv ${UPSTREAM}.tmp ${UPSTREAM} | |
48 | ||
49 | # NOTE: needs npm installed, downloads packages from npm | |
50 | .PHONY: buildupstream | |
51 | buildupstream: ${BUILDSRC} | |
52 | cp ${BUILDSRC}/build/eslint.js ${SRCDIR}/eslint.js | |
53 | ||
54 | ${BUILDSRC}: ${UPSTREAM} patches | |
55 | rm -rf $@ | |
56 | mkdir $@.tmp | |
57 | rsync -ra ${UPSTREAM}/ $@.tmp | |
58 | cd $@.tmp; ln -s ../patches patches | |
59 | cd $@.tmp; quilt push -a | |
60 | cd $@.tmp; rm -rf .pc ./patches | |
61 | mv $@.tmp $@ | |
62 | cd $@; npm install | |
63 | cd $@; npm run webpack | |
64 | ||
65 | .PHONY: upload | |
66 | upload: ${DEB} | |
67 | tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg,pve --dist buster | |
68 | ||
69 | .PHONY: distclean | |
70 | distclean: clean | |
71 | ||
72 | .PHONY: clean | |
73 | clean: | |
382381f7 | 74 | rm -rf *~ debian/*~ *.deb ${BUILDSRC} *.tmp/ ${BUILDDIR} *.changes *.tar.gz *.dsc *.buildinfo |
eb39fafa DC |
75 | |
76 | .PHONY: dinstall | |
77 | dinstall: deb | |
78 | dpkg -i ${DEB} |