]> git.proxmox.com Git - pve-jslint.git/blob - Makefile
add 'Proxmox' to globals
[pve-jslint.git] / Makefile
1 PACKAGE=pve-jslint
2 VERSION=1.0
3 PACKAGERELEASE=4
4
5 PKGREL=${VERSION}-${PACKAGERELEASE}
6 DEB=${PACKAGE}_${PKGREL}_all.deb
7 GITVERSION:=$(shell cat .git/refs/heads/master)
8
9 all: ${DEB}
10
11 .PHONY: dinstall
12 dinstall: ${DEB}
13 dpkg -i ${DEB}
14
15 .PHONY: deb
16 deb: ${DEB}
17 ${DEB}:
18 make clean
19 rm -rf dest
20 mkdir dest
21 make DESTDIR=`pwd`/dest install
22 mkdir dest/DEBIAN
23 sed -e 's/@PKGREL@/${PKGREL}/' <control.in >dest/DEBIAN/control
24 mkdir -p dest/usr/share/doc/${PACKAGE}
25 echo "git clone git://git.proxmox.com/git/pve-jslint.git\\ngit checkout ${GITVERSION}" > dest/usr/share/doc/${PACKAGE}/SOURCE
26 install -m 0644 copyright dest/usr/share/doc/${PACKAGE}
27 install -m 0644 changelog.Debian dest/usr/share/doc/${PACKAGE}
28 gzip -n --best dest/usr/share/doc/${PACKAGE}/changelog.Debian
29 fakeroot dpkg-deb --build dest
30 mv dest.deb ${DEB}
31 rm -rf dest
32 lintian ${DEB}
33
34 rhinoed_jslint.js: jslint.js rhino.js
35 cat jslint.js rhino.js >$@.tmp
36 mv $@.tmp $@
37
38 install: rhinoed_jslint.js jslint
39 mkdir -p ${DESTDIR}/usr/share/${PACKAGE}
40 install -m 0644 rhinoed_jslint.js ${DESTDIR}/usr/share/${PACKAGE}/rhinoed_jslint.js
41 mkdir -p ${DESTDIR}/usr/bin
42 install -m 0755 jslint ${DESTDIR}/usr/bin
43
44 jslint.js download:
45 wget -O jslint.js http://jslint.com/jslint.js
46
47 .PHONY: distclean
48 distclean: clean
49
50 .PHONY: clean
51 clean:
52 rm -rf *~ dest control rhinoed_jslint.js *.deb
53
54 .PHONY: upload
55 upload: ${DEB}
56 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist stretch