2022-01-24 03:10:04 +03:00
#include /usr/share/dpkg/pkg-info.mk
2020-06-06 19:05:20 +03:00
export DEB_VERSION_UPSTREAM_REVISION
2019-05-22 08:12:53 +03:00
2020-06-06 18:35:28 +03:00
export PACKAGE = proxmox-widget-toolkit
2021-06-02 17:10:58 +03:00
DEB = ${ PACKAGE } _${ DEB_VERSION_UPSTREAM_REVISION } _all.deb
DEV_DEB = ${ PACKAGE } -dev_${ DEB_VERSION_UPSTREAM_REVISION } _all.deb
DEBS = ${ DEB } ${ DEV_DEB }
2020-06-06 18:35:28 +03:00
DSC = ${ PACKAGE } _${ DEB_VERSION_UPSTREAM_REVISION } .dsc
2017-01-30 11:57:12 +03:00
2021-06-02 17:10:58 +03:00
BUILDDIR ?= ${ PACKAGE } -${ DEB_VERSION_UPSTREAM }
2017-01-30 11:57:12 +03:00
2021-06-02 17:10:58 +03:00
${BUILDDIR} : GITVERSION :=$( shell git rev -parse HEAD )
2019-03-30 14:56:57 +03:00
${BUILDDIR} :
2020-06-06 18:35:28 +03:00
rm -rf ${ BUILDDIR } ${ BUILDDIR } .tmp
cp -a src/ ${ BUILDDIR } .tmp
cp -a debian ${ BUILDDIR } .tmp/
echo " git clone git://git.proxmox.com/git/proxmox-widget-toolkit.git\\ngit checkout ${ GITVERSION } " > ${ BUILDDIR } .tmp/debian/SOURCE
mv ${ BUILDDIR } .tmp/ ${ BUILDDIR }
2019-03-30 14:56:57 +03:00
2017-01-30 11:57:12 +03:00
.PHONY : deb
2021-05-28 15:13:41 +03:00
deb : ${DEBS }
${DEBS} : ${BUILDDIR }
2019-03-30 14:56:57 +03:00
cd ${ BUILDDIR } ; dpkg-buildpackage -b -us -uc
2021-05-28 15:13:41 +03:00
lintian ${ DEBS }
2017-01-30 11:57:12 +03:00
2019-03-30 14:56:57 +03:00
.PHONY : dsc
dsc : ${DSC }
${DSC} : ${BUILDDIR }
2019-05-22 08:13:23 +03:00
cd ${ BUILDDIR } ; dpkg-buildpackage -S -us -uc -d
2019-03-30 14:56:57 +03:00
lintian ${ DSC }
2017-01-30 11:57:12 +03:00
.PHONY : lint
lint : ${JSSRC }
2020-06-06 18:35:28 +03:00
${ MAKE } -C src lint
2017-01-30 11:57:12 +03:00
.PHONY : upload
2021-05-28 15:13:41 +03:00
upload : ${DEBS }
2021-06-08 10:46:54 +03:00
tar cf - ${ DEB } | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist bullseye
tar cf - ${ DEV_DEB } | ssh -X repoman@repo.proxmox.com -- upload --product devel --dist bullseye
2017-01-30 11:57:12 +03:00
distclean : clean
clean :
2020-11-02 09:41:30 +03:00
$( MAKE) -C src clean
2020-06-06 18:35:28 +03:00
rm -rf ${ BUILDDIR } ${ BUILDDIR } .tmp *.tar.gz *.dsc *.deb *.changes *.buildinfo
2017-01-30 11:57:12 +03:00
find . -name '*~' -exec rm { } ';'
.PHONY : dinstall
2021-05-28 15:13:41 +03:00
dinstall : ${DEBS }
dpkg -i ${ DEBS }