]> git.proxmox.com Git - pve-http-server.git/blame - Makefile
update Bootstrap to 3.4.1
[pve-http-server.git] / Makefile
CommitLineData
a9fc6893
TL
1include /usr/share/dpkg/pkg-info.mk
2include /usr/share/dpkg/architecture.mk
3
d8218001 4PACKAGE=libpve-http-server-perl
d8218001 5
a9fc6893
TL
6GITVERSION:=$(shell git rev-parse HEAD)
7BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
8
9DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
d8218001
DM
10
11DESTDIR=
12
13PERL5DIR=${DESTDIR}/usr/share/perl5
14DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
15
6edb39f6
DM
16WWWBASEDIR=${DESTDIR}/usr/share/${PACKAGE}
17WWWCSSDIR=${WWWBASEDIR}/css
18WWWFONTSDIR=${WWWBASEDIR}/fonts
19WWWJSDIR=${WWWBASEDIR}/js
20
21# bootstrap library
a94e0490 22BTVER=3.4.1
6edb39f6
DM
23BTDIR=bootstrap-${BTVER}-dist
24BTSRC=${BTDIR}.zip
25
26BTDATA = \
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
6be73370 32JQVER=3.4.1
968a4a6d
DM
33JQSRC=jquery-${JQVER}.min.js
34
5a554403 35all:
d8218001
DM
36
37.PHONY: deb
e4bce23e
WB
38deb: ${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
46download_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
51download_jquery:
52 rm -f ${JQSRC} ${JQSRC}.tmp
6be73370 53 wget https://code.jquery.com/jquery-${JQVER}.min.js -O ${JQSRC}.tmp
968a4a6d
DM
54 mv ${JQSRC}.tmp ${JQSRC}
55
6edb39f6
DM
56${BTDATA}: ${BTSRC}
57 rm -rf ${BTDIR}
58 unzip -x ${BTSRC}
59 touch $@
60
61install: ${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
83upload: ${DEB}
fd03f0e3 84 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist stretch
d8218001
DM
85
86distclean: clean
fc75d786 87 rm -f examples/simple-demo.pem
d8218001
DM
88
89clean:
e8ae1f09 90 rm -rf ./build *.deb *.changes *.buildinfo ${BTDIR} examples/simple-demo.lck
d8218001
DM
91 find . -name '*~' -exec rm {} ';'
92
93.PHONY: dinstall
94dinstall: ${DEB}
95 dpkg -i ${DEB}