2017-01-30 11:57:12 +03:00
PACKAGE = proxmox-widget-toolkit
PKGVER = 1.0
2019-05-07 17:22:42 +03:00
PKGREL = 27
2017-01-30 11:57:12 +03:00
2019-03-30 15:00:20 +03:00
BUILDDIR ?= ${ PACKAGE } -${ PKGVER }
2019-03-30 14:57:19 +03:00
GITVERSION := $( shell git rev-parse HEAD)
2019-03-30 14:56:57 +03:00
2017-01-30 11:57:12 +03:00
DEB = ${ PACKAGE } _${ PKGVER } -${ PKGREL } _all.deb
2019-03-30 14:56:57 +03:00
DSC = ${ PACKAGE } _${ PKGVER } -${ PKGREL } .dsc
2017-01-30 11:57:12 +03:00
DESTDIR =
DOCDIR = ${ DESTDIR } /usr/share/doc/${ PACKAGE }
WWWBASEDIR = ${ DESTDIR } /usr/share/javascript/${ PACKAGE }
JSSRC = \
Utils.js \
2017-01-31 19:32:18 +03:00
Toolkit.js \
2017-03-31 11:19:53 +03:00
mixin/CBind.js \
2017-01-30 11:57:12 +03:00
data/reader/JsonObject.js \
data/ProxmoxProxy.js \
data/UpdateStore.js \
data/DiffStore.js \
data/ObjectStore.js \
2017-08-29 08:03:32 +03:00
data/RRDStore.js \
2017-01-30 15:40:51 +03:00
data/TimezoneStore.js \
2017-02-24 10:32:30 +03:00
form/IntegerField.js \
2017-01-31 19:12:14 +03:00
form/TextField.js \
2017-09-20 13:42:19 +03:00
form/DateTimeField.js \
2017-01-31 19:17:12 +03:00
form/Checkbox.js \
2017-02-25 12:20:12 +03:00
form/KVComboBox.js \
2017-10-04 11:50:59 +03:00
form/LanguageSelector.js \
2017-03-22 14:32:28 +03:00
form/ComboGrid.js \
2017-08-29 07:25:25 +03:00
form/RRDTypeSelector.js \
2017-11-14 13:17:03 +03:00
form/BondModeSelector.js \
2017-02-25 16:35:29 +03:00
button/Button.js \
2017-09-27 11:04:29 +03:00
button/HelpButton.js \
2017-01-30 15:40:51 +03:00
grid/ObjectGrid.js \
2017-02-24 09:45:09 +03:00
grid/PendingObjectGrid.js \
2017-01-31 19:08:47 +03:00
panel/InputPanel.js \
2017-01-31 13:58:53 +03:00
panel/LogView.js \
2017-08-29 09:43:50 +03:00
panel/RRDChart.js \
2017-10-10 16:10:20 +03:00
panel/GaugeWidget.js \
2017-01-30 15:40:51 +03:00
window/Edit.js \
2017-03-27 09:14:46 +03:00
window/PasswordEdit.js \
2017-01-30 15:40:51 +03:00
window/TaskViewer.js \
2017-09-21 14:05:07 +03:00
node/APT.js \
2017-01-31 19:05:09 +03:00
node/NetworkEdit.js \
node/NetworkView.js \
2017-02-01 09:14:07 +03:00
node/DNSEdit.js \
2018-09-13 15:55:54 +03:00
node/HostsView.js \
2017-02-01 09:14:07 +03:00
node/DNSView.js \
2017-01-31 11:25:24 +03:00
node/Tasks.js \
2017-01-31 17:21:37 +03:00
node/ServiceView.js \
2017-01-30 15:40:51 +03:00
node/TimeEdit.js \
node/TimeView.js
2017-01-30 11:57:12 +03:00
all :
2019-03-30 14:56:57 +03:00
${BUILDDIR} :
rm -rf ${ BUILDDIR }
rsync -a * ${ BUILDDIR }
2019-03-30 14:57:19 +03:00
echo " git clone git://git.proxmox.com/git/proxmox-widget-toolkit.git\\ngit checkout ${ GITVERSION } " > ${ BUILDDIR } /debian/SOURCE
2019-03-30 14:56:57 +03:00
2017-01-30 11:57:12 +03:00
.PHONY : deb
2018-02-09 12:13:31 +03:00
deb : ${DEB }
2019-03-30 14:56:57 +03:00
${DEB} : ${BUILDDIR }
cd ${ BUILDDIR } ; dpkg-buildpackage -b -us -uc
2017-01-30 11:57:12 +03:00
lintian ${ DEB }
2019-03-30 14:56:57 +03:00
.PHONY : dsc
dsc : ${DSC }
${DSC} : ${BUILDDIR }
cd ${ BUILDDIR } ; dpkg-buildpackage -S -us -uc -d -nc
lintian ${ DSC }
2017-01-30 11:57:12 +03:00
.PHONY : lint
lint : ${JSSRC }
jslint ${ JSSRC }
proxmoxlib.js : ${JSSRC }
2017-12-18 12:31:13 +03:00
# add the version as comment in the file
echo " // ${ PKGVER } - ${ PKGREL } " > $@ .tmp
cat ${ JSSRC } >> $@ .tmp
2017-01-30 11:57:12 +03:00
mv $@ .tmp $@
install : proxmoxlib .js
install -d -m 755 ${ WWWBASEDIR }
install -m 0644 proxmoxlib.js ${ WWWBASEDIR }
.PHONY : upload
upload : ${DEB }
2017-03-08 19:03:11 +03:00
tar cf - ${ DEB } | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg --dist stretch
2017-01-30 11:57:12 +03:00
distclean : clean
clean :
2019-03-30 14:56:57 +03:00
rm -rf ${ BUILDDIR } *.tar.gz *.dsc *.deb *.changes *.buildinfo proxmoxlib.js
2017-01-30 11:57:12 +03:00
find . -name '*~' -exec rm { } ';'
.PHONY : dinstall
dinstall : ${DEB }
dpkg -i ${ DEB }