]> git.proxmox.com Git - pve-spice-protocol.git/blob - Makefile
ffc9f1975a8f5d56eaf3c5a6a3c15edb5ca4221d
[pve-spice-protocol.git] / Makefile
1 SOURCE=spice-protocol
2 PACKAGE=libspice-protocol
3
4 PKGVERSION=0.14.0
5 DEBVERSION=0.14.0-1
6 PVERELEASE=pve6
7
8 VERSION := $(DEBVERSION)~$(PVERELEASE)
9
10 PKGDIR=spice-protocol-${PKGVERSION}
11 PKGSRC=${PKGDIR}.tar.bz2
12
13 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
14 GITVERSION:=$(shell cat .git/refs/heads/master)
15
16 DEB=$(PACKAGE)-dev_${VERSION}_all.deb
17 DEBS=$(DEB)
18
19 all: ${DEBS}
20 echo ${DEBS}
21
22 .PHONY: deb
23 deb: $(DEB)
24 $(DEB): $(SOURCE)_$(PKGVERSION).orig.tar.bz2 $(SOURCE)_$(DEBVERSION).debian.tar.xz
25 rm -rf ${PKGDIR}
26 tar xf $(SOURCE)_$(PKGVERSION).orig.tar.bz2
27 tar xf $(SOURCE)_$(DEBVERSION).debian.tar.xz -C $(SOURCE)-$(PKGVERSION)
28 cat changelog.Debian $(PKGDIR)/debian/changelog > $(PKGDIR)/debian/changelog.tmp
29 mv $(PKGDIR)/debian/changelog.tmp $(PKGDIR)/debian/changelog
30 cd ${PKGDIR}; dpkg-buildpackage -b -us -uc
31 lintian ${DEBS}
32
33
34 .PHONY: download
35 download: $(SOURCE)_$(PKGVERSION).orig.tar.bz2 $(SOURCE)_$(DEBVERSION).debian.tar.xz
36 $(SOURCE)_$(PKGVERSION).orig.tar.bz2: $(SOURCE)_$(DEBVERSION).debian.tar.xz
37 $(SOURCE)_$(DEBVERSION).debian.tar.xz:
38 dget http://deb.debian.org/debian/pool/main/s/spice-protocol/spice-protocol_0.14.0-1.dsc
39
40 .PHONY: upload
41 upload: ${DEBS}
42 tar cf - ${DEBS}|ssh repoman@repo.proxmox.com -- upload --product pve --dist stretch --arch ${ARCH}
43
44 distclean: clean
45 rm -f *.tar.*
46
47 .PHONY: clean
48 clean:
49 rm -rf *~ debian/*~ *.deb *.changes *.dsc *.buildinfo $(SOURCE)-*/ ${PKGDIR}
50
51 .PHONY: dinstall
52 dinstall: ${DEBS}
53 dpkg -i ${DEBS}