]> git.proxmox.com Git - pve-http-server.git/blame - Makefile
buildsys: no need to include arch detection for arch-independent package
[pve-http-server.git] / Makefile
CommitLineData
a9fc6893 1include /usr/share/dpkg/pkg-info.mk
a9fc6893 2
d8218001 3PACKAGE=libpve-http-server-perl
d8218001 4
a9fc6893
TL
5GITVERSION:=$(shell git rev-parse HEAD)
6BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
7
8DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
d8218001
DM
9
10DESTDIR=
11
12PERL5DIR=${DESTDIR}/usr/share/perl5
13DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
14
6edb39f6
DM
15WWWBASEDIR=${DESTDIR}/usr/share/${PACKAGE}
16WWWCSSDIR=${WWWBASEDIR}/css
17WWWFONTSDIR=${WWWBASEDIR}/fonts
18WWWJSDIR=${WWWBASEDIR}/js
19
20# bootstrap library
a94e0490 21BTVER=3.4.1
6edb39f6
DM
22BTDIR=bootstrap-${BTVER}-dist
23BTSRC=${BTDIR}.zip
24
25BTDATA = \
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 31JQVER=3.4.1
968a4a6d
DM
32JQSRC=jquery-${JQVER}.min.js
33
5a554403 34all:
d8218001
DM
35
36.PHONY: deb
e4bce23e
WB
37deb: ${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
45download_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
50download_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
60install: ${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
82upload: ${DEB}
fd03f0e3 83 tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist stretch
d8218001 84
584d34a7 85.PHONY: clean distclean
d8218001 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}