2023-11-17 16:45:35 +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:11:29 +03:00
2015-02-18 13:30:48 +03:00
PACKAGE = pve-ha-manager
2015-02-19 10:59:01 +03:00
SIMPACKAGE = pve-ha-simulator
2014-12-01 08:22:52 +03:00
2018-02-07 12:32:27 +03:00
GITVERSION := $( shell git rev-parse HEAD)
2023-05-24 20:10:42 +03:00
BUILDDIR ?= $( PACKAGE) -$( DEB_VERSION)
2015-02-18 13:30:48 +03:00
2023-05-24 20:10:42 +03:00
DEB = $( PACKAGE) _$( DEB_VERSION) _$( DEB_HOST_ARCH) .deb
DBG_DEB = $( PACKAGE) -dbgsym_$( DEB_VERSION) _$( DEB_HOST_ARCH) .deb
2022-01-20 20:08:27 +03:00
2023-05-24 20:10:42 +03:00
DSC = $( PACKAGE) _$( DEB_VERSION) .dsc
SIMDEB = $( SIMPACKAGE) _$( DEB_VERSION) _all.deb
SIMDSC = $( SIMPACKAGE) _$( DEB_VERSION) .dsc
2015-02-18 13:30:48 +03:00
2017-10-13 12:26:00 +03:00
all : deb
2015-02-18 13:30:48 +03:00
2023-05-24 20:08:29 +03:00
$(BUILDDIR) :
2023-05-24 20:24:59 +03:00
rm -rf $@ $@ .tmp
cp -a src/ $@ .tmp
cp -a debian $@ .tmp/
echo " git clone git://git.proxmox.com/git/pve-ha-manager.git\\ngit checkout $( GITVERSION) " > $@ .tmp/debian/SOURCE
mv $@ .tmp $@
2019-03-30 20:59:36 +03:00
2018-09-28 13:48:48 +03:00
.PHONY : dinstall
2017-02-06 17:32:34 +03:00
dinstall : $( DEB ) $( SIMDEB )
2023-05-24 20:08:29 +03:00
dpkg -i $( DEB) $( SIMDEB)
2015-02-18 13:30:48 +03:00
2017-02-06 17:32:34 +03:00
.PHONY : deb
2023-05-24 20:08:29 +03:00
deb : $( DEB ) $( SIMDEB )
$(DEB) $(DBG_DEB) : $( BUILDDIR )
cd $( BUILDDIR) ; dpkg-buildpackage -b -us -uc
lintian $( DEB)
lintian $( SIMDEB)
2014-12-01 08:22:52 +03:00
2019-03-30 20:59:36 +03:00
.PHONY : dsc
2023-05-24 20:25:47 +03:00
dsc :
$( MAKE) clean
$( MAKE) $( DSC)
lintian $( DSC)
2023-05-24 20:08:29 +03:00
$(DSC) : $( BUILDDIR )
cd $( BUILDDIR) ; dpkg-buildpackage -S -us -uc -d
2023-05-24 20:25:47 +03:00
sbuild : $( DSC )
sbuild $( DSC)
2019-03-30 20:59:36 +03:00
2014-12-01 09:06:38 +03:00
.PHONY : clean
2015-03-09 12:47:19 +03:00
clean :
2015-03-12 14:20:18 +03:00
make -C src clean
2023-05-24 20:25:47 +03:00
rm -rf $( PACKAGE) -[ 0-9] */ *.dsc *.deb $( PACKAGE) *.tar* *.changes *.build *.buildinfo
2015-02-18 13:30:48 +03:00
.PHONY : distclean
distclean : clean
2014-12-01 09:06:38 +03:00
2015-03-13 12:54:32 +03:00
.PHONY : upload
2023-05-24 20:26:14 +03:00
upload : UPLOAD_DIST ?= $( DEB_DISTRIBUTION )
2023-05-24 20:08:29 +03:00
upload : $( DEB ) $( SIMDEB )
2023-05-24 20:26:14 +03:00
tar cf - $( DEB) $( DBG_DEB) $( SIMDEB) | ssh repoman@repo.proxmox.com -- upload --product pve --dist $( UPLOAD_DIST) --arch $( DEB_HOST_ARCH)