]>
Commit | Line | Data |
---|---|---|
1 | include /usr/share/dpkg/pkg-info.mk | |
2 | ||
3 | PACKAGE=pmg-gui | |
4 | ||
5 | DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb | |
6 | ||
7 | DESTDIR= | |
8 | DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE} | |
9 | WWWBASEDIR=${DESTDIR}/usr/share/javascript/${PACKAGE} | |
10 | WWWCSSDIR=${WWWBASEDIR}/css | |
11 | WWWIMAGESDIR=${WWWBASEDIR}/images | |
12 | WWWJSDIR=${WWWBASEDIR}/js | |
13 | ||
14 | IMAGES= \ | |
15 | images/logo-128.png \ | |
16 | images/proxmox_logo.png | |
17 | ||
18 | CSSFILES = css/ext6-pmg.css css/ext6-pmg-mobile.css | |
19 | ||
20 | export DEB_VERSION_UPSTREAM_REVISION | |
21 | ||
22 | all: | |
23 | ||
24 | .PHONY: deb | |
25 | deb ${DEB}: | |
26 | rm -rf build | |
27 | rsync -a * build | |
28 | cd build; dpkg-buildpackage -b -us -uc | |
29 | lintian ${DEB} | |
30 | ||
31 | .PHONY: js/pmgmanagerlib.js js/mobile/pmgmanagerlib-mobile.js | |
32 | js/pmgmanagerlib.js: | |
33 | make -C js pmgmanagerlib.js | |
34 | js/mobile/pmgmanagerlib-mobile.js: | |
35 | make -C js/mobile pmgmanagerlib-mobile.js | |
36 | ||
37 | install: pmg-index.html.tt pmg-mobile-index.html.tt js/pmgmanagerlib.js js/mobile/pmgmanagerlib-mobile.js ${IMAGES} ${CSSFILES} | |
38 | install -d -m 755 ${WWWBASEDIR} | |
39 | install -d -m 755 ${WWWCSSDIR} | |
40 | install -d -m 755 ${WWWIMAGESDIR} | |
41 | install -d -m 755 ${WWWJSDIR} | |
42 | install -m 0644 pmg-index.html.tt ${WWWBASEDIR} | |
43 | install -m 0644 pmg-mobile-index.html.tt ${WWWBASEDIR} | |
44 | install -m 0644 js/pmgmanagerlib.js ${WWWJSDIR} | |
45 | install -m 0644 js/mobile/pmgmanagerlib-mobile.js ${WWWJSDIR} | |
46 | for f in ${IMAGES}; do install -m 0644 "$$f" ${WWWIMAGESDIR}; done | |
47 | for f in ${CSSFILES}; do install -m 0644 "$$f" ${WWWCSSDIR}; done | |
48 | ||
49 | .PHONY: upload | |
50 | upload: ${DEB} | |
51 | tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist bullseye | |
52 | ||
53 | distclean: clean | |
54 | rm -f examples/simple-demo.pem | |
55 | ||
56 | .PHONY: lint | |
57 | check: | |
58 | $(MAKE) -C js/ check | |
59 | $(MAKE) -C js/mobile check | |
60 | ||
61 | clean: | |
62 | make -C js clean | |
63 | rm -rf ./build *.deb *.changes *.buildinfo | |
64 | find . -name '*~' -exec rm {} ';' | |
65 | ||
66 | .PHONY: dinstall | |
67 | dinstall: ${DEB} | |
68 | dpkg -i ${DEB} |