]> git.proxmox.com Git - proxmox-backup-restore-image.git/blame - Makefile
bump version to 0.5.0
[proxmox-backup-restore-image.git] / Makefile
CommitLineData
3b259e7a
SR
1include /usr/share/dpkg/pkg-info.mk
2include /usr/share/dpkg/architecture.mk
3
275f3083 4PACKAGE=proxmox-backup-restore-image
2a1ef81f 5PACKAGE_DBG=proxmox-backup-restore-image-debug
3b259e7a 6
2695c253 7BUILDDIR=$(PACKAGE)-$(DEB_VERSION_UPSTREAM_REVISION)
043c575c 8DSC=$(PACKAGE)_$(DEB_VERSION_UPSTREAM).dsc
3b259e7a 9
2695c253 10DEB=$(PACKAGE)_$(DEB_VERSION)_$(DEB_BUILD_ARCH).deb
2695c253
TL
11DEB_DBG=$(PACKAGE_DBG)_$(DEB_VERSION)_$(DEB_BUILD_ARCH).deb
12DSC_DBG=$(PACKAGE_DBG)_$(DEB_VERSION).dsc
3b259e7a
SR
13
14all: deb
15
275f3083 16ZFSONLINUX_SUBMODULE=src/submodules/zfsonlinux
09e46f60 17KERNEL_SUBMODULE=src/submodules/ubuntu-kernel
275f3083 18
3b259e7a 19submodules.prepared:
2695c253
TL
20 git submodule update --init $(KERNEL_SUBMODULE)
21 git submodule update --init --recursive $(ZFSONLINUX_SUBMODULE)
3b259e7a
SR
22 touch $@
23
275f3083 24.PHONY: builddir
2695c253 25builddir: $(BUILDDIR)
3b259e7a 26
2695c253 27$(BUILDDIR): submodules.prepared
d7de479f 28 rm -rf $@ $@.tmp
275f3083 29 cd src; make clean
d7de479f
TL
30 cp -a src $@.tmp
31 cp -a debian $@.tmp/
809d9b22
TL
32 rm -rf $@.tmp/pkgs
33 cd $@.tmp; DOWNLOAD_ONLY="1" ./build_initramfs.sh && mv build/initramfs/pkgs .
d7de479f 34 mv $@.tmp $@
3b259e7a
SR
35
36.PHONY: deb
2695c253
TL
37deb: $(DEB)
38$(DEB): $(BUILDDIR)
39 cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
40 lintian $(DEB) $(DEB_DBG)
41$(DEB_DBG): $(DEB)
3b259e7a
SR
42
43.PHONY: dsc
043c575c
TL
44dsc: clean
45 $(MAKE) $(DSC)
46 lintian $(DSC)
47
2695c253
TL
48$(DSC): $(BUILDDIR)
49 cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
043c575c
TL
50
51sbuild: $(DSC)
52 sbuild $<
3b259e7a 53
275f3083
TL
54.PHONY: dinstall
55dinstall: deb
2695c253 56 dpkg -i $(DEB) $(DEB_DBG)
275f3083 57
3b259e7a 58.PHONY: upload
92977ccd 59upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
2695c253 60upload: $(DEB)
92977ccd 61 tar cf - $(DEB) $(DEB_DBG) | ssh -X repoman@repo.proxmox.com upload --product pve --dist $(UPLOAD_DIST)
3b259e7a
SR
62
63.PHONY: clean
64clean:
d7de479f 65 $(MAKE) -C src $@
96aa3526 66 $(MAKE) -C src clean-pkgs
043c575c
TL
67 rm -rf $(PACKAGE)-[0-9]*/ *.prepared
68 rm -f $(PACKAGE)*.tar* *.deb *.dsc *.changes *.build *.buildinfo