[pve-devel] [PATCH widget-toolkit 1/2] add css and image directory to packaging

Dominik Csapak d.csapak at proxmox.com
Wed Jul 24 09:21:11 CEST 2019


Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 Makefile        | 18 +++++-------------
 css/Makefile    | 13 +++++++++++++
 defines.mk      | 15 +++++++++++++++
 images/Makefile | 13 +++++++++++++
 4 files changed, 46 insertions(+), 13 deletions(-)
 create mode 100644 css/Makefile
 create mode 100644 defines.mk
 create mode 100644 images/Makefile

diff --git a/Makefile b/Makefile
index d12a4da..7aa7f73 100644
--- a/Makefile
+++ b/Makefile
@@ -1,18 +1,8 @@
 include /usr/share/dpkg/pkg-info.mk
 
-PACKAGE=proxmox-widget-toolkit
+include defines.mk
 
-BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
-GITVERSION:=$(shell git rev-parse HEAD)
-
-DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
-DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
-
-DESTDIR=
-
-DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
-
-WWWBASEDIR=${DESTDIR}/usr/share/javascript/${PACKAGE}
+SUBDIRS= css images
 
 JSSRC=					\
 	Utils.js			\
@@ -58,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}
@@ -90,6 +81,7 @@ proxmoxlib.js: ${JSSRC}
 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}
diff --git a/css/Makefile b/css/Makefile
new file mode 100644
index 0000000..36e62ff
--- /dev/null
+++ b/css/Makefile
@@ -0,0 +1,13 @@
+include ../defines.mk
+
+CSS=
+
+all:
+
+.PHONY: install
+install: ${CSS}
+	install -d ${WWWCSSDIR}
+	for i in ${CSS}; do install -m 0755 $$i ${WWWCSSDIR}/$$i; done
+
+.PHONY: clean
+clean:
diff --git a/defines.mk b/defines.mk
new file mode 100644
index 0000000..99461e1
--- /dev/null
+++ b/defines.mk
@@ -0,0 +1,15 @@
+PACKAGE=proxmox-widget-toolkit
+
+BUILDDIR ?= ${PACKAGE}-${DEB_VERSION_UPSTREAM}
+GITVERSION:=$(shell git rev-parse HEAD)
+
+DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
+DSC=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}.dsc
+
+DESTDIR=
+
+DOCDIR=${DESTDIR}/usr/share/doc/${PACKAGE}
+
+WWWBASEDIR=${DESTDIR}/usr/share/javascript/${PACKAGE}
+WWWCSSDIR=${WWWBASEDIR}/css
+WWWIMAGESDIR=${WWWBASEDIR}/images
diff --git a/images/Makefile b/images/Makefile
new file mode 100644
index 0000000..002ad27
--- /dev/null
+++ b/images/Makefile
@@ -0,0 +1,13 @@
+include ../defines.mk
+
+IMAGES=
+
+all:
+
+.PHONY: install
+install: ${IMAGES}
+	install -d ${WWWIMAGESDIR}
+	for i in ${IMAGES}; do install -m 0755 $$i ${WWWIMAGESDIR}/$$i; done
+
+.PHONY: clean
+clean:
-- 
2.20.1





More information about the pve-devel mailing list