2019-05-23 18:42:54 +03:00
i n c l u d e / u s r / s h a r e / d p k g / p k g - i n f o . m k
2015-05-06 12:45:10 +03:00
PACKAGE = pve-zsync
DESTDIR =
2023-05-24 14:39:54 +03:00
SBINDIR = $( DESTDIR) /usr/sbin
MAN8DIR = $( DESTDIR) /usr/share/man/man8
DOCDIR = $( DESTDIR) /usr/share/doc/$( PACKAGE)
WORKDIR = $( DESTDIR) /var/lib/pve-zsync
2018-06-06 09:20:47 +03:00
2023-05-24 14:39:54 +03:00
BUILDDIR ?= $( PACKAGE) -$( DEB_VERSION_UPSTREAM)
2015-05-06 12:45:10 +03:00
2018-06-06 09:20:47 +03:00
GITVERSION := $( shell git rev-parse HEAD)
2015-05-06 12:45:10 +03:00
2023-05-24 14:39:54 +03:00
DEB = $( PACKAGE) _$( DEB_VERSION_UPSTREAM_REVISION) _all.deb
DSC = $( PACKAGE) _$( DEB_VERSION_UPSTREAM_REVISION) .dsc
2015-05-06 12:45:10 +03:00
2018-06-06 09:20:47 +03:00
all :
2015-05-06 12:45:10 +03:00
.PHONY : dinstall
dinstall : deb
2023-05-24 14:39:54 +03:00
dpkg -i $( DEB)
2015-05-06 12:45:10 +03:00
2018-06-06 09:20:47 +03:00
pve-zsync.8 : pve -zsync
2023-05-24 14:39:54 +03:00
./pve-zsync printpod | pod2man -c "Proxmox Documentation" -s 8 -r $( DEB_VERSION_UPSTREAM) -n pve-zsync - pve-zsync.8
2015-05-06 12:45:10 +03:00
.PHONY : install
2018-06-06 09:20:47 +03:00
install : pve -zsync .8
2023-05-24 14:39:54 +03:00
install -d $( SBINDIR)
install -m 0755 pve-zsync $( SBINDIR) /pve-zsync
install -d $( WORKDIR)
install -d $( MAN8DIR)
install -m 0644 pve-zsync.8 $( MAN8DIR) /pve-zsync.8
install -d $( DOCDIR)
$(BUILDDIR) :
2023-05-24 14:44:06 +03:00
rm -rf $@ .tmp $@
rsync -a * $@ .tmp
echo " git clone git://git.proxmox.com/git/dab.git\\ngit checkout $( GITVERSION) " > $@ .tmp/debian/SOURCE
mv $@ .tmp $@
2015-05-06 12:45:10 +03:00
2017-02-13 16:27:50 +03:00
.PHONY : deb
2023-05-24 14:39:54 +03:00
deb : $( DEB )
$(DEB) : $( BUILDDIR )
cd $( BUILDDIR) ; dpkg-buildpackage -b -us -uc
lintian $( DEB)
2015-05-06 12:45:10 +03:00
2019-03-31 16:52:20 +03:00
.PHONY : dsc
2023-05-24 14:39:54 +03:00
dsc : $( DSC )
$(DSC) : $( BUILDDIR )
2023-05-24 14:59:02 +03:00
cd $( BUILDDIR) ; dpkg-buildpackage -S -us -uc -d
2023-05-24 14:39:54 +03:00
lintian $( DSC)
2019-03-31 16:52:20 +03:00
2023-05-24 14:49:50 +03:00
sbuild : $( DSC )
sbuild $( DSC)
2015-05-06 12:45:10 +03:00
.PHONY : clean
clean :
2023-05-24 14:48:49 +03:00
rm -rf $( PACKAGE) -[ 0-9] */ *.deb *.dsc $( PACKAGE) *.tar.?z *.build *.buildinfo *.changes
2015-05-06 12:45:10 +03:00
find . -name '*~' -exec rm { } ';'
.PHONY : distclean
distclean : clean
.PHONY : upload
2023-05-24 14:46:22 +03:00
upload : UPLOAD_DIST ?= $( DEB_DISTRIBUTION )
2023-05-24 14:39:54 +03:00
upload : $( DEB )
2023-05-24 14:46:22 +03:00
tar cf - $( DEB) | ssh repoman@repo.proxmox.com upload --product pve --dist $( UPLOAD_DIST)