]> git.proxmox.com Git - proxmox-widget-toolkit.git/blobdiff - Makefile
add css and image directory to packaging
[proxmox-widget-toolkit.git] / Makefile
index d2b905cc22a3e74f6fb3d0e3db4694f0a30d24cb..7aa7f73211a0abeb8f541a1b6d78fc4cf63a7b6b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,18 +1,8 @@
-PACKAGE=proxmox-widget-toolkit
-PKGVER=1.0
-PKGREL=27
+include /usr/share/dpkg/pkg-info.mk
 
-BUILDDIR ?= ${PACKAGE}-${PKGVER}
-GITVERSION:=$(shell git rev-parse HEAD)
+include defines.mk
 
-DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb
-DSC=${PACKAGE}_${PKGVER}-${PKGREL}.dsc
-
-DESTDIR=
-
-DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
-
-WWWBASEDIR=${DESTDIR}/usr/share/javascript/${PACKAGE}
+SUBDIRS= css images
 
 JSSRC=                                 \
        Utils.js                        \
@@ -34,12 +24,14 @@ JSSRC=                                      \
        form/ComboGrid.js               \
        form/RRDTypeSelector.js         \
        form/BondModeSelector.js        \
+       form/NetworkSelector.js         \
        button/Button.js                \
        button/HelpButton.js            \
        grid/ObjectGrid.js              \
        grid/PendingObjectGrid.js       \
        panel/InputPanel.js             \
        panel/LogView.js                \
+       panel/JournalView.js            \
        panel/RRDChart.js               \
        panel/GaugeWidget.js            \
        window/Edit.js                  \
@@ -56,7 +48,8 @@ JSSRC=                                        \
        node/TimeEdit.js                \
        node/TimeView.js
 
-all:
+all: ${SUBDIRS}
+       set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i; done
 
 ${BUILDDIR}:
        rm -rf ${BUILDDIR}
@@ -72,7 +65,7 @@ ${DEB}: ${BUILDDIR}
 .PHONY: dsc
 dsc: ${DSC}
 ${DSC}: ${BUILDDIR}
-       cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d -nc
+       cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d
        lintian ${DSC}
 
 .PHONY: lint
@@ -81,20 +74,20 @@ lint: ${JSSRC}
 
 proxmoxlib.js: ${JSSRC}
        # add the version as comment in the file
-       echo "// ${PKGVER}-${PKGREL}" > $@.tmp
+       echo "// ${DEB_VERSION_UPSTREAM_REVISION}" > $@.tmp
        cat ${JSSRC} >> $@.tmp
        mv $@.tmp $@
 
 install: proxmoxlib.js
        install -d -m 755 ${WWWBASEDIR}
        install -m 0644 proxmoxlib.js ${WWWBASEDIR}
+       set -e && for i in ${SUBDIRS}; do ${MAKE} -C $$i $@; done
 
 .PHONY: upload
 upload: ${DEB}
-       tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist stretch
+       tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist buster
 
 distclean: clean
-
 clean:
        rm -rf ${BUILDDIR} *.tar.gz *.dsc *.deb *.changes *.buildinfo proxmoxlib.js
        find . -name '*~' -exec rm {} ';'