]> git.proxmox.com Git - pve-eslint.git/blame - Makefile
first commit
[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
9
10SRCDIR=src
11UPSTREAM=eslint
12UPSTREAMTAG=v7.0.0-alpha.3
13BUILDSRC=${UPSTREAM}-${UPSTREAMTAG}
14
15all: ${DEB}
16 @echo ${DEB}
17
18.PHONY: deb
19deb: ${DEB}
20${DEB}: ${SRCDIR}
21 rm -rf ${BUILDDIR}
22 mkdir ${BUILDDIR}
23 cp -a debian ${BUILDDIR}/
24 cp -a ${SRCDIR}/* ${BUILDDIR}/
25 echo "git clone git://git.proxmox.com/git/pve-eslint.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/debian/SOURCE
26 cd ${BUILDDIR}; dpkg-buildpackage -rfakeroot -b -uc -us
27 lintian ${DEB}
28 @echo ${DEB}
29
30.PHONY: download
31download:
32 rm -rf ${UPSTREAM}.tmp ${UPSTREAM}
33 git clone -b ${UPSTREAMTAG} --depth 1 https://github.com/eslint/eslint ${UPSTREAM}.tmp
34 rm -rf ${UPSTREAM}.tmp/.git
35 find ${UPSTREAM}.tmp/ -type f -name '.gitignore' -delete
36 mv ${UPSTREAM}.tmp ${UPSTREAM}
37
38# NOTE: needs npm installed, downloads packages from npm
39.PHONY: buildupstream
40buildupstream: ${BUILDSRC}
41 cp ${BUILDSRC}/build/eslint.js ${SRCDIR}/eslint.js
42
43${BUILDSRC}: ${UPSTREAM} patches
44 rm -rf $@
45 mkdir $@.tmp
46 rsync -ra ${UPSTREAM}/ $@.tmp
47 cd $@.tmp; ln -s ../patches patches
48 cd $@.tmp; quilt push -a
49 cd $@.tmp; rm -rf .pc ./patches
50 mv $@.tmp $@
51 cd $@; npm install
52 cd $@; npm run webpack
53
54.PHONY: upload
55upload: ${DEB}
56 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg,pve --dist buster
57
58.PHONY: distclean
59distclean: clean
60
61.PHONY: clean
62clean:
63 rm -rf *~ debian/*~ *.deb ${BUILDSRC} ${BUILDSRC}.tmp ${UPSTREAM}.tmp ${BUILDDIR} *.changes *.dsc *.buildinfo
64
65.PHONY: dinstall
66dinstall: deb
67 dpkg -i ${DEB}