]>
Commit | Line | Data |
---|---|---|
a9fc6893 | 1 | include /usr/share/dpkg/pkg-info.mk |
a9fc6893 | 2 | |
d8218001 | 3 | PACKAGE=libpve-http-server-perl |
d8218001 | 4 | |
a9fc6893 TL |
5 | GITVERSION:=$(shell git rev-parse HEAD) |
6 | BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM} | |
7 | ||
8 | DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb | |
d8218001 DM |
9 | |
10 | DESTDIR= | |
11 | ||
12 | PERL5DIR=${DESTDIR}/usr/share/perl5 | |
13 | DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE} | |
14 | ||
6edb39f6 DM |
15 | WWWBASEDIR=${DESTDIR}/usr/share/${PACKAGE} |
16 | WWWCSSDIR=${WWWBASEDIR}/css | |
17 | WWWFONTSDIR=${WWWBASEDIR}/fonts | |
18 | WWWJSDIR=${WWWBASEDIR}/js | |
19 | ||
20 | # bootstrap library | |
a94e0490 | 21 | BTVER=3.4.1 |
6edb39f6 DM |
22 | BTDIR=bootstrap-${BTVER}-dist |
23 | BTSRC=${BTDIR}.zip | |
24 | ||
25 | BTDATA = \ | |
26 | ${BTDIR}/css/bootstrap.min.css \ | |
27 | ${BTDIR}/css/bootstrap-theme.min.css \ | |
28 | ${BTDIR}/js/bootstrap.min.js \ | |
29 | ${BTDIR}/fonts/glyphicons-halflings-regular.ttf | |
30 | ||
6be73370 | 31 | JQVER=3.4.1 |
968a4a6d DM |
32 | JQSRC=jquery-${JQVER}.min.js |
33 | ||
5a554403 | 34 | all: |
d8218001 DM |
35 | |
36 | .PHONY: deb | |
e4bce23e WB |
37 | deb: ${DEB} |
38 | ${DEB}: | |
a9fc6893 TL |
39 | rm -rf ${BUILDDIR} |
40 | rsync -a * ${BUILDDIR} | |
41 | echo "git clone git://git.proxmox.com/git/pve-http-server\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE | |
42 | cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc | |
d8218001 DM |
43 | lintian ${DEB} |
44 | ||
6edb39f6 DM |
45 | download_bootstrap: |
46 | rm -f ${BTSRC}$ ${BTSRC}.tmp | |
47 | wget https://github.com/twbs/bootstrap/releases/download/v${BTVER}/${BTSRC} -O ${BTSRC}.tmp | |
48 | mv ${BTSRC}.tmp ${BTSRC} | |
49 | ||
968a4a6d DM |
50 | download_jquery: |
51 | rm -f ${JQSRC} ${JQSRC}.tmp | |
6be73370 | 52 | wget https://code.jquery.com/jquery-${JQVER}.min.js -O ${JQSRC}.tmp |
968a4a6d DM |
53 | mv ${JQSRC}.tmp ${JQSRC} |
54 | ||
80a25890 TL |
55 | ${BTDATA}: ${BTDIR} |
56 | ${BTDIR}: ${BTSRC} | |
6edb39f6 DM |
57 | rm -rf ${BTDIR} |
58 | unzip -x ${BTSRC} | |
6edb39f6 DM |
59 | |
60 | install: ${BTDATA} | |
d08808bc DM |
61 | install -d -m 755 ${PERL5DIR}/PVE/APIServer |
62 | install -m 0644 PVE/APIServer/AnyEvent.pm ${PERL5DIR}/PVE/APIServer | |
63307beb | 63 | install -m 0644 PVE/APIServer/Formatter.pm ${PERL5DIR}/PVE/APIServer |
c610c859 | 64 | install -m 0644 PVE/APIServer/Utils.pm ${PERL5DIR}/PVE/APIServer |
63307beb DM |
65 | install -d -m 755 ${PERL5DIR}/PVE/APIServer/Formatter |
66 | install -m 0644 PVE/APIServer/Formatter/Standard.pm ${PERL5DIR}/PVE/APIServer/Formatter | |
67 | install -m 0644 PVE/APIServer/Formatter/Bootstrap.pm ${PERL5DIR}/PVE/APIServer/Formatter | |
68 | install -m 0644 PVE/APIServer/Formatter/HTML.pm ${PERL5DIR}/PVE/APIServer/Formatter | |
968a4a6d | 69 | # install bootstrap and jquery |
6edb39f6 DM |
70 | install -d -m 755 ${WWWBASEDIR} |
71 | install -d -m 755 ${WWWCSSDIR} | |
72 | install -m 0644 -o www-data -g www-data ${BTDIR}/css/bootstrap.min.css ${WWWCSSDIR} | |
73 | install -m 0644 -o www-data -g www-data ${BTDIR}/css/bootstrap-theme.min.css ${WWWCSSDIR} | |
74 | install -d -m 755 ${WWWJSDIR} | |
75 | install -m 0644 -o www-data -g www-data ${BTDIR}/js/bootstrap.min.js ${WWWJSDIR} | |
968a4a6d | 76 | install -m 0644 -o www-data -g www-data ${JQSRC} ${WWWJSDIR} |
6edb39f6 DM |
77 | install -d -m 755 ${WWWFONTSDIR} |
78 | install -m 0644 ${BTDIR}/fonts/glyphicons-halflings-regular.ttf ${WWWFONTSDIR} | |
63307beb | 79 | |
d8218001 DM |
80 | |
81 | .PHONY: upload | |
82 | upload: ${DEB} | |
3396e081 | 83 | tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist buster |
d8218001 | 84 | |
584d34a7 | 85 | .PHONY: clean distclean |
d8218001 | 86 | distclean: clean |
fc75d786 | 87 | rm -f examples/simple-demo.pem |
d8218001 DM |
88 | |
89 | clean: | |
8a29f1fc | 90 | rm -rf ${PACKAGE}-*/ *.deb *.changes *.buildinfo ${BTDIR} examples/simple-demo.lck |
d8218001 DM |
91 | find . -name '*~' -exec rm {} ';' |
92 | ||
93 | .PHONY: dinstall | |
94 | dinstall: ${DEB} | |
95 | dpkg -i ${DEB} |