]> git.proxmox.com Git - lxcfs.git/blame - Makefile
update Makefile to get version info from changelog
[lxcfs.git] / Makefile
CommitLineData
270f2667 1PACKAGE=lxcfs
47494414
OB
2PKGVER != dpkg-parsechangelog -Sversion | cut -d- -f1
3PKGREL != dpkg-parsechangelog -Sversion | cut -d- -f2
270f2667
DM
4
5SRCDIR=${PACKAGE}
3f783aec 6BUILDSRC := $(SRCDIR).tmp
270f2667
DM
7
8ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
3f783aec 9GITVERSION:=$(shell git rev-parse HEAD)
270f2667 10
47494414
OB
11DEB1=${PACKAGE}_${PKGVER}-${PKGREL}_${ARCH}.deb
12DEB2=${PACKAGE}-dbgsym_${PKGVER}-${PKGREL}_${ARCH}.deb
fde1adc6 13DEBS=$(DEB1) $(DEB2)
270f2667
DM
14
15all: ${DEB}
16
3f783aec
WB
17.PHONY: submodule
18submodule:
ce6d8e46 19 test -f "${SRCDIR}/README" || git submodule update --init
3f783aec 20
261830cd 21.PHONY: deb
fde1adc6
WB
22deb: $(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 34upload: $(DEBS)
6d9f43e0 35 tar cf - ${DEBS} | ssh repoman@repo.proxmox.com upload --product pve --dist stretch
270f2667
DM
36
37distclean: clean
38
39.PHONY: clean
40clean:
3f783aec 41 rm -rf $(BUILDSRC) *_${ARCH}.deb *.changes *.dsc *.buildinfo
270f2667
DM
42
43.PHONY: dinstall
fde1adc6
WB
44dinstall: $(DEBS)
45 dpkg -i $(DEBS)