]>
Commit | Line | Data |
---|---|---|
270f2667 | 1 | PACKAGE=lxcfs |
47494414 OB |
2 | PKGVER != dpkg-parsechangelog -Sversion | cut -d- -f1 |
3 | PKGREL != dpkg-parsechangelog -Sversion | cut -d- -f2 | |
270f2667 DM |
4 | |
5 | SRCDIR=${PACKAGE} | |
3f783aec | 6 | BUILDSRC := $(SRCDIR).tmp |
270f2667 DM |
7 | |
8 | ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) | |
3f783aec | 9 | GITVERSION:=$(shell git rev-parse HEAD) |
270f2667 | 10 | |
47494414 OB |
11 | DEB1=${PACKAGE}_${PKGVER}-${PKGREL}_${ARCH}.deb |
12 | DEB2=${PACKAGE}-dbgsym_${PKGVER}-${PKGREL}_${ARCH}.deb | |
fde1adc6 | 13 | DEBS=$(DEB1) $(DEB2) |
270f2667 DM |
14 | |
15 | all: ${DEB} | |
16 | ||
3f783aec WB |
17 | .PHONY: submodule |
18 | submodule: | |
ce6d8e46 | 19 | test -f "${SRCDIR}/README" || git submodule update --init |
3f783aec | 20 | |
261830cd | 21 | .PHONY: deb |
fde1adc6 WB |
22 | deb: $(DEBS) |
23 | $(DEB2): $(DEB1) | |
3f783aec WB |
24 | $(DEB1): | submodule |
25 | rm -f *.deb | |
26 | rm -rf $(BUILDSRC) | |
27 | cp -a $(SRCDIR) $(BUILDSRC) | |
28 | cp -a debian $(BUILDSRC)/debian | |
29 | echo "git clone git://git.proxmox.com/git/lxc.git\\ngit checkout $(GITVERSION)" > $(BUILDSRC)/debian/SOURCE | |
30 | cd $(BUILDSRC); dpkg-buildpackage -rfakeroot -b -us -uc | |
31 | #lintian $(DEBS) | |
270f2667 DM |
32 | |
33 | .PHONY: upload | |
fde1adc6 | 34 | upload: $(DEBS) |
6d9f43e0 | 35 | tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload --product pve --dist stretch |
270f2667 DM |
36 | |
37 | distclean: clean | |
38 | ||
39 | .PHONY: clean | |
40 | clean: | |
3f783aec | 41 | rm -rf $(BUILDSRC) *_${ARCH}.deb *.changes *.dsc *.buildinfo |
270f2667 DM |
42 | |
43 | .PHONY: dinstall | |
fde1adc6 WB |
44 | dinstall: $(DEBS) |
45 | dpkg -i $(DEBS) |