]> git.proxmox.com Git - pve-http-server.git/blame - Makefile
bump version to 1.0-2
[pve-http-server.git] / Makefile
CommitLineData
d8218001
DM
1PACKAGE=libpve-http-server-perl
2PKGVER=1.0
77a98dfe 3PKGREL=2
d8218001
DM
4
5DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb
6
7DESTDIR=
8
9PERL5DIR=${DESTDIR}/usr/share/perl5
10DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
11
6edb39f6
DM
12WWWBASEDIR=${DESTDIR}/usr/share/${PACKAGE}
13WWWCSSDIR=${WWWBASEDIR}/css
14WWWFONTSDIR=${WWWBASEDIR}/fonts
15WWWJSDIR=${WWWBASEDIR}/js
16
17# bootstrap library
18BTVER=3.3.7
19BTDIR=bootstrap-${BTVER}-dist
20BTSRC=${BTDIR}.zip
21
22BTDATA = \
23 ${BTDIR}/css/bootstrap.min.css \
24 ${BTDIR}/css/bootstrap-theme.min.css \
25 ${BTDIR}/js/bootstrap.min.js \
26 ${BTDIR}/fonts/glyphicons-halflings-regular.ttf
27
968a4a6d
DM
28JQVER=3.3.1
29JQSRC=jquery-${JQVER}.min.js
30
5a554403 31all:
d8218001
DM
32
33.PHONY: deb
34deb ${DEB}:
35 rm -rf build
5a554403
FG
36 rsync -a * build
37 cd build; dpkg-buildpackage -b -us -uc
d8218001
DM
38 lintian ${DEB}
39
6edb39f6
DM
40download_bootstrap:
41 rm -f ${BTSRC}$ ${BTSRC}.tmp
42 wget https://github.com/twbs/bootstrap/releases/download/v${BTVER}/${BTSRC} -O ${BTSRC}.tmp
43 mv ${BTSRC}.tmp ${BTSRC}
44
968a4a6d
DM
45download_jquery:
46 rm -f ${JQSRC} ${JQSRC}.tmp
47 wget https://code.jquery.com/jquery-3.1.1.min.js -O ${JQSRC}.tmp
48 mv ${JQSRC}.tmp ${JQSRC}
49
6edb39f6
DM
50${BTDATA}: ${BTSRC}
51 rm -rf ${BTDIR}
52 unzip -x ${BTSRC}
53 touch $@
54
55install: ${BTDATA}
d08808bc
DM
56 install -d -m 755 ${PERL5DIR}/PVE/APIServer
57 install -m 0644 PVE/APIServer/AnyEvent.pm ${PERL5DIR}/PVE/APIServer
63307beb
DM
58 install -m 0644 PVE/APIServer/Formatter.pm ${PERL5DIR}/PVE/APIServer
59 install -d -m 755 ${PERL5DIR}/PVE/APIServer/Formatter
60 install -m 0644 PVE/APIServer/Formatter/Standard.pm ${PERL5DIR}/PVE/APIServer/Formatter
61 install -m 0644 PVE/APIServer/Formatter/Bootstrap.pm ${PERL5DIR}/PVE/APIServer/Formatter
62 install -m 0644 PVE/APIServer/Formatter/HTML.pm ${PERL5DIR}/PVE/APIServer/Formatter
968a4a6d 63 # install bootstrap and jquery
6edb39f6
DM
64 install -d -m 755 ${WWWBASEDIR}
65 install -d -m 755 ${WWWCSSDIR}
66 install -m 0644 -o www-data -g www-data ${BTDIR}/css/bootstrap.min.css ${WWWCSSDIR}
67 install -m 0644 -o www-data -g www-data ${BTDIR}/css/bootstrap-theme.min.css ${WWWCSSDIR}
68 install -d -m 755 ${WWWJSDIR}
69 install -m 0644 -o www-data -g www-data ${BTDIR}/js/bootstrap.min.js ${WWWJSDIR}
968a4a6d 70 install -m 0644 -o www-data -g www-data ${JQSRC} ${WWWJSDIR}
6edb39f6
DM
71 install -d -m 755 ${WWWFONTSDIR}
72 install -m 0644 ${BTDIR}/fonts/glyphicons-halflings-regular.ttf ${WWWFONTSDIR}
63307beb 73
d8218001
DM
74
75.PHONY: upload
76upload: ${DEB}
77 tar cf - ${DEB} | ssh repoman@repo.proxmox.com upload
78
79distclean: clean
80
81clean:
e4718189 82 rm -rf ./build *.deb *.changes ${BTDIR} simple-demo.pem simple-demo.lck
d8218001
DM
83 find . -name '*~' -exec rm {} ';'
84
85.PHONY: dinstall
86dinstall: ${DEB}
87 dpkg -i ${DEB}