2022-01-24 03:10:04 +03:00
#include /usr/share/dpkg/pkg-info.mk
2019-05-22 08:12:53 +03:00
2023-05-25 10:47:32 +03:00
PACKAGE = proxmox-widget-toolkit
2021-06-02 17:10:58 +03:00
2023-05-25 11:14:58 +03:00
DEB = $( PACKAGE) _$( DEB_VERSION) _all.deb
DEV_DEB = $( PACKAGE) -dev_$( DEB_VERSION) _all.deb
2021-06-02 17:10:58 +03:00
2023-05-17 12:43:45 +03:00
DEBS = $( DEB) $( DEV_DEB)
2023-05-25 11:14:58 +03:00
DSC = $( PACKAGE) _$( DEB_VERSION) .dsc
2017-01-30 11:57:12 +03:00
2023-05-17 12:43:45 +03:00
BUILDDIR ?= $( PACKAGE) -$( DEB_VERSION_UPSTREAM)
2017-01-30 11:57:12 +03:00
2023-05-17 12:43:45 +03:00
$(BUILDDIR) : GITVERSION :=$( shell git rev -parse HEAD )
$(BUILDDIR) :
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
2023-05-17 12:43:45 +03:00
deb : $( DEBS )
$(DEBS) : $( BUILDDIR )
cd $( BUILDDIR) ; dpkg-buildpackage -b -us -uc
lintian $( DEBS)
2017-01-30 11:57:12 +03:00
2019-03-30 14:56:57 +03:00
.PHONY : dsc
2023-05-17 12:43:45 +03:00
dsc : $( DSC )
2023-05-25 11:15:11 +03:00
$( MAKE) clean
$( MAKE) $( DSC)
lintian $( DSC)
2023-05-17 12:43:45 +03:00
$(DSC) : $( BUILDDIR )
cd $( BUILDDIR) ; dpkg-buildpackage -S -us -uc -d
2023-05-25 11:15:11 +03:00
sbuild : $( DSC )
sbuild $( DSC)
2019-03-30 14:56:57 +03:00
2017-01-30 11:57:12 +03:00
.PHONY : lint
2023-05-17 12:43:45 +03:00
lint : $( JSSRC )
$( MAKE) -C src lint
2017-01-30 11:57:12 +03:00
.PHONY : upload
2023-05-17 12:45:24 +03:00
upload : UPLOAD_DIST ?= $( DEB_DISTRIBUTION )
2023-05-17 12:43:45 +03:00
upload : $( DEBS )
2023-05-17 12:45:24 +03:00
tar cf - $( DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist $( UPLOAD_DIST)
tar cf - $( DEV_DEB) | ssh -X repoman@repo.proxmox.com -- upload --product devel --dist $( UPLOAD_DIST)
2017-01-30 11:57:12 +03:00
distclean : clean
clean :
2020-11-02 09:41:30 +03:00
$( MAKE) -C src clean
2023-05-17 12:47:00 +03:00
rm -rf $( PACKAGE) -[ 0-9] */ *.tar.* *.dsc *.deb *.changes *.buildinfo *.build
2017-01-30 11:57:12 +03:00
.PHONY : dinstall
2023-05-17 12:43:45 +03:00
dinstall : $( DEBS )
dpkg -i $( DEBS)