]> git.proxmox.com Git - pve-eslint.git/blame - Makefile
fixup! import 8.3.0 source
[pve-eslint.git] / Makefile
CommitLineData
eb39fafa
DC
1include /usr/share/dpkg/pkg-info.mk
2
3PACKAGE=pve-eslint
4
5GITVERSION:=$(shell git rev-parse HEAD)
6BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
7
8DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
382381f7 9DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
eb39fafa
DC
10
11SRCDIR=src
12UPSTREAM=eslint
4900068a 13UPSTREAMTAG=v8.3.0
eb39fafa
DC
14BUILDSRC=${UPSTREAM}-${UPSTREAMTAG}
15
16all: ${DEB}
17 @echo ${DEB}
18
382381f7
TL
19.PHONY: dsc deb builddir
20
21${BUILDDIR}: builddir
22builddir: ${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
30dsc: ${DSC}
31${DSC}: builddir
32 cd ${BUILDDIR}; dpkg-buildpackage -S -uc -us
33 lintian ${DSC}
34
35deb: ${DEB}
36${DEB}: builddir
37 cd ${BUILDDIR}; dpkg-buildpackage -b -uc -us
eb39fafa
DC
38 lintian ${DEB}
39 @echo ${DEB}
40
41.PHONY: download
42download:
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
51buildupstream: ${BUILDSRC}
4b0098f6 52 cp ${BUILDSRC}/build/eslint.js ${SRCDIR}/lib/eslint.js
eb39fafa
DC
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
66upload: ${DEB}
61dc968b 67 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg,pve --dist bullseye
eb39fafa
DC
68
69.PHONY: distclean
70distclean: clean
71
72.PHONY: clean
73clean:
382381f7 74 rm -rf *~ debian/*~ *.deb ${BUILDSRC} *.tmp/ ${BUILDDIR} *.changes *.tar.gz *.dsc *.buildinfo
eb39fafa
DC
75
76.PHONY: dinstall
77dinstall: deb
78 dpkg -i ${DEB}