2017-07-07 09:45:06 +02:00
RELEASE = 5.0
2015-05-06 11:45:10 +02:00
2015-09-18 16:18:54 +02:00
VERSION = 1.6
2015-05-06 11:45:10 +02:00
PACKAGE = pve-zsync
2018-06-05 15:28:52 +02:00
PKGREL = 16
2015-05-06 11:45:10 +02:00
DESTDIR =
PREFIX = /usr
BINDIR = ${ PREFIX } /bin
SBINDIR = ${ PREFIX } /sbin
MANDIR = ${ PREFIX } /share/man
DOCDIR = ${ PREFIX } /share/doc/${ PACKAGE }
PODDIR = ${ DOCDIR } /pod
MAN1DIR = ${ MANDIR } /man8/
#ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
ARCH = all
GITVERSION := $( shell cat .git/refs/heads/master)
DEB = ${ PACKAGE } _${ VERSION } -${ PKGREL } _${ ARCH } .deb
all : ${DEB }
.PHONY : dinstall
dinstall : deb
dpkg -i ${ DEB }
%.8.gz : %.8.man
rm -f $@
2017-02-13 14:27:34 +01:00
gzip -n pve-zsync.8.man -c9 >$@
2015-05-06 11:45:10 +02:00
pve-zsync.8.man : pve -zsync
2018-03-09 16:55:42 +01:00
./pve-zsync printpod | pod2man -c "Proxmox Documentation" -s 8 -r ${ RELEASE } -n pve-zsync - pve-zsync.8.man
2015-05-06 11:45:10 +02:00
.PHONY : install
install : pve -zsync .8.man pve -zsync .8.gz
install -d ${ DESTDIR } ${ SBINDIR }
install -m 0755 pve-zsync ${ DESTDIR } ${ SBINDIR }
install -d ${ DESTDIR } /usr/share/man/man8
install -d ${ DESTDIR } ${ PODDIR }
install -m 0644 pve-zsync.8.gz ${ DESTDIR } /usr/share/man/man8/
2017-02-13 14:27:50 +01:00
.PHONY : deb
deb : ${DEB }
${DEB} :
2015-05-06 11:45:10 +02:00
rm -rf debian
mkdir debian
install -d debian/var/lib/pve-zsync
make DESTDIR = ${ CURDIR } /debian install
install -d -m 0755 debian/DEBIAN
sed -e s/@@VERSION@@/${ VERSION } / -e s/@@PKGRELEASE@@/${ PKGREL } / -e s/@@ARCH@@/${ ARCH } / <control.in >debian/DEBIAN/control
install -D -m 0644 copyright debian/${ DOCDIR } /copyright
install -m 0644 changelog.Debian debian/${ DOCDIR } /
2017-02-13 14:27:34 +01:00
gzip -n -9 debian/${ DOCDIR } /changelog.Debian
2015-05-06 11:45:10 +02:00
echo " git clone git://git.proxmox.com/git/pve-storage.git\\ngit checkout ${ GITVERSION } " > debian/${ DOCDIR } /SOURCE
2017-02-13 14:28:06 +01:00
fakeroot dpkg-deb --build debian
2015-05-06 11:45:10 +02:00
mv debian.deb ${ DEB }
2017-02-13 14:28:15 +01:00
lintian ${ DEB }
2015-05-06 11:45:10 +02:00
rm -rf debian
.PHONY : clean
clean :
2017-03-17 15:42:17 +01:00
rm -rf debian *.deb ${ PACKAGE } -*.tar.gz dist *.8.man *.8.gz *.buildinfo
2015-05-06 11:45:10 +02:00
find . -name '*~' -exec rm { } ';'
.PHONY : distclean
distclean : clean
.PHONY : upload
upload : ${DEB }
2018-06-05 16:03:38 +02:00
tar cf - ${ DEB } | ssh repoman@repo.proxmox.com upload --product pve --dist stretch