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