2023-05-06 18:12:11 +03:00
i n c l u d e / u s r / s h a r e / d p k g / d e f a u l t . m k
2019-05-22 20:22:17 +03:00
2014-06-13 11:20:55 +04:00
PACKAGE = novnc-pve
2017-05-22 17:58:10 +03:00
SRCDIR = novnc
2023-05-06 18:00:07 +03:00
BUILDDIR = $( SRCDIR) .tmp
2023-05-06 18:13:01 +03:00
ORIG_SRC_TAR = $( PACKAGE) _$( DEB_VERSION_UPSTREAM) .orig.tar.gz
2014-06-13 09:29:42 +04:00
2018-01-23 10:19:55 +03:00
GITVERSION := $( shell git rev-parse HEAD)
2014-06-13 09:29:42 +04:00
2023-05-06 18:00:07 +03:00
DEB = $( PACKAGE) _$( DEB_VERSION_UPSTREAM_REVISION) _all.deb
DSC = $( PACKAGE) _$( DEB_VERSION_UPSTREAM_REVISION) .dsc
2014-06-13 11:20:55 +04:00
2019-09-09 17:31:09 +03:00
all :
2014-06-13 09:29:42 +04:00
2023-05-06 18:00:07 +03:00
$(SRCDIR)/vnc.html : submodule
$(BUILDDIR) : $( SRCDIR ) /vnc .html
rm -rf $( BUILDDIR)
cp -rpa $( SRCDIR) $( BUILDDIR)
cp -a debian $( BUILDDIR)
echo " git clone git://git.proxmox.com/git/novnc-pve.git\\ngit checkout $( GITVERSION) " > $( BUILDDIR) /debian/SOURCE
2019-05-22 20:31:36 +03:00
.PHONY : deb
2023-05-06 18:00:07 +03:00
deb : $( DEB )
$(DEB) : $( BUILDDIR )
cd $( BUILDDIR) ; dpkg-buildpackage -b -uc -us
lintian $( DEB)
@echo $( DEB)
2017-05-22 17:58:10 +03:00
2023-05-06 18:13:01 +03:00
$(ORIG_SRC_TAR) : $( BUILDDIR )
2023-05-08 15:31:54 +03:00
tar czf $( ORIG_SRC_TAR) --exclude= " $( BUILDDIR) /debian " $( BUILDDIR)
2023-05-06 18:13:01 +03:00
2019-05-22 20:31:36 +03:00
.PHONY : dsc
2023-05-06 18:00:07 +03:00
dsc : $( DSC )
2023-05-06 18:13:01 +03:00
$(DSC) : $( ORIG_SRC_TAR ) $( BUILDDIR )
2023-05-06 18:00:07 +03:00
cd $( BUILDDIR) ; dpkg-buildpackage -S -uc -us -d
lintian $( DSC)
2019-05-22 20:31:36 +03:00
2023-05-08 15:32:29 +03:00
sbuild : $( DSC )
sbuild $( DSC)
2017-05-22 17:58:10 +03:00
.PHONY : submodule
submodule :
2023-05-06 18:00:07 +03:00
test -f " $( SRCDIR) /package.json " || git submodule update --init
2014-06-13 09:29:42 +04:00
.PHONY : download
2023-05-06 18:00:07 +03:00
download $(SRCDIR) :
2017-05-22 17:58:10 +03:00
git submodule foreach 'git pull --ff-only origin master'
2014-06-13 09:29:42 +04:00
2014-06-13 11:38:05 +04:00
.PHONY : upload
2023-05-06 18:12:11 +03:00
upload : UPLOAD_DIST ?= $( DEB_DISTRIBUTION )
2023-05-06 18:00:07 +03:00
upload : $( DEB )
2023-05-06 18:12:11 +03:00
tar cf - $( DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pmg,pve --dist $( UPLOAD_DIST)
2014-06-13 11:38:05 +04:00
.PHONY : distclean
distclean : clean
2014-06-13 09:29:42 +04:00
.PHONY : clean
clean :
2023-05-06 18:16:09 +03:00
rm -rf $( PACKAGE) -[ 0-9] */ $( ) *.deb *.dsc $( PACKAGE) *.tar.[ gx] z *.changes *.dsc *.buildinfo *.build
2017-05-22 17:58:10 +03:00
.PHONY : dinstall
dinstall : deb
2023-05-06 18:00:07 +03:00
dpkg -i $( DEB)