]> git.proxmox.com Git - pve-http-server.git/blob - Makefile
Bootstrap.pm: remove support for IE8 and older
[pve-http-server.git] / Makefile
1 PACKAGE=libpve-http-server-perl
2 PKGVER=1.0
3 PKGREL=1
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
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
28 all: ${DEB}
29
30 .PHONY: deb
31 deb ${DEB}:
32 rm -rf build
33 rsync -a debian build
34 make DESTDIR=./build install
35 cd build; dpkg-buildpackage -rfakeroot -b -us -uc
36 lintian ${DEB}
37
38 download_bootstrap:
39 rm -f ${BTSRC}$ ${BTSRC}.tmp
40 wget https://github.com/twbs/bootstrap/releases/download/v${BTVER}/${BTSRC} -O ${BTSRC}.tmp
41 mv ${BTSRC}.tmp ${BTSRC}
42
43 ${BTDATA}: ${BTSRC}
44 rm -rf ${BTDIR}
45 unzip -x ${BTSRC}
46 touch $@
47
48 install: ${BTDATA}
49 install -d -m 755 ${PERL5DIR}/PVE/APIServer
50 install -m 0644 PVE/APIServer/AnyEvent.pm ${PERL5DIR}/PVE/APIServer
51 install -m 0644 PVE/APIServer/Formatter.pm ${PERL5DIR}/PVE/APIServer
52 install -d -m 755 ${PERL5DIR}/PVE/APIServer/Formatter
53 install -m 0644 PVE/APIServer/Formatter/Standard.pm ${PERL5DIR}/PVE/APIServer/Formatter
54 install -m 0644 PVE/APIServer/Formatter/Bootstrap.pm ${PERL5DIR}/PVE/APIServer/Formatter
55 install -m 0644 PVE/APIServer/Formatter/HTML.pm ${PERL5DIR}/PVE/APIServer/Formatter
56 # install bootstrap
57 install -d -m 755 ${WWWBASEDIR}
58 install -d -m 755 ${WWWCSSDIR}
59 install -m 0644 -o www-data -g www-data ${BTDIR}/css/bootstrap.min.css ${WWWCSSDIR}
60 install -m 0644 -o www-data -g www-data ${BTDIR}/css/bootstrap-theme.min.css ${WWWCSSDIR}
61 install -d -m 755 ${WWWJSDIR}
62 install -m 0644 -o www-data -g www-data ${BTDIR}/js/bootstrap.min.js ${WWWJSDIR}
63 install -d -m 755 ${WWWFONTSDIR}
64 install -m 0644 ${BTDIR}/fonts/glyphicons-halflings-regular.ttf ${WWWFONTSDIR}
65
66
67 .PHONY: upload
68 upload: ${DEB}
69 tar cf - ${DEB} | ssh repoman@repo.proxmox.com upload
70
71 distclean: clean
72
73 clean:
74 rm -rf ./build *.deb *.changes ${BTDIR}
75 find . -name '*~' -exec rm {} ';'
76
77 .PHONY: dinstall
78 dinstall: ${DEB}
79 dpkg -i ${DEB}