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