]> git.proxmox.com Git - libjs-qrcodejs.git/blame - Makefile
buildsys: derive upload dist automatically
[libjs-qrcodejs.git] / Makefile
CommitLineData
ce9cfc8f 1include /usr/share/dpkg/pkg-info.mk
ce9cfc8f 2
9616af76
TL
3PACKAGE=libjs-qrcodejs
4BUILDDIR ?= $(PACKAGE)-$(DEB_VERSION)
5ORIG_SRC_TAR=$(PACKAGE)_$(DEB_VERSION_UPSTREAM).orig.tar.gz
6
7DEB=$(PACKAGE)_$(DEB_VERSION)_all.deb
8DSC=$(PACKAGE)_$(DEB_VERSION).dsc
ce9cfc8f
WB
9
10GITVERSION:=$(shell git rev-parse HEAD)
11
12all:
13 true
14
15$(BUILDDIR):
16 rm -rf $(BUILDDIR).tmp
c17a7b3a
TL
17 cp -a src $(BUILDDIR).tmp
18 cp -a debian $(BUILDDIR).tmp/
ce9cfc8f
WB
19 echo "git clone git://git.proxmox.com/git/libjs-qrcodejs.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR).tmp/debian/SOURCE
20 mv $(BUILDDIR).tmp/ $(BUILDDIR)
21
f98d9cb0
TL
22$(ORIG_SRC_TAR): $(BUILDDIR)
23 tar czf $(ORIG_SRC_TAR) --exclude="$(BUILDDIR)/debian" $(BUILDDIR)
24
ce9cfc8f
WB
25.PHONY: deb
26deb: $(DEB)
27$(DEB): $(BUILDDIR)
28 cd $(BUILDDIR); dpkg-buildpackage -b -us -uc
29 lintian $(DEB)
30
31.PHONY: dsc
32dsc: $(DSC)
f98d9cb0
TL
33 $(MAKE) clean
34 $(MAKE) $(DSC)
ce9cfc8f
WB
35 lintian $(DSC)
36
f98d9cb0
TL
37$(DSC): $(BUILDDIR) $(ORIG_SRC_TAR)
38 cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d
39
18a3203f
TL
40sbuild: $(DSC)
41 sbuild $(DSC)
42
ff240abb
TL
43# HACK, but this is a *very* seldom bumped package and normally 1:1 the same in all our dists
44-include /etc/os-release
45
ce9cfc8f 46.PHONY: upload
ff240abb 47upload: UPLOAD_DIST ?= $(VERSION_CODENAME)
ce9cfc8f 48upload: $(DEB)
ff240abb 49 tar cf - $(DEB) | ssh -X repoman@repo.proxmox.com -- upload --product pve,pmg,pbs --dist $(UPLOAD_DIST)
ce9cfc8f
WB
50
51distclean: clean
52clean:
c17a7b3a 53 $(MAKE) -C src clean
f98d9cb0 54 rm -rf $(PACKAGE)-[0-9]*/ $(PACKAGE)*tar* *.dsc *.deb *.changes *.build *.buildinfo
ce9cfc8f
WB
55
56.PHONY: dinstall
57dinstall: $(DEB)
58 dpkg -i $(DEB)