]> git.proxmox.com Git - smartmontools.git/blob - Makefile
use git submodule foreach and pull
[smartmontools.git] / Makefile
1 RELEASE=4.3
2
3 PACKAGE=smartmontools
4 VER=6.5+svn4324
5 DEBREL=1~pve80
6
7 SRCDIR=smartmontools
8
9 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
10 GITVERSION:=$(shell cat .git/refs/heads/master)
11
12 DEB=${PACKAGE}_${VER}-${DEBREL}_${ARCH}.deb
13
14 all: ${DEB}
15 echo ${DEB}
16
17 deb ${DEB}: submodule
18 rm -rf ${SRCDIR}.tmp
19 cp -rpa ${SRCDIR} ${SRCDIR}.tmp
20 cd ${SRCDIR}.tmp; patch -p1 < ../patches/update_changelog.patch
21 cd ${SRCDIR}.tmp; dpkg-buildpackage -rfakeroot -b -uc -us
22 lintian ${DEB}
23 echo ${DEB}
24
25 # make sure submodule was initialized
26 .PHONY: submodule
27 submodule:
28 test -f "${SRCDIR}/debian/changelog" || git submodule update --init
29
30 # upgrade to current master
31 .PHONY: download
32 download ${SRCDIR}: submodule
33 git submodule foreach 'git pull --ff-only origin master'
34
35 .PHONY: upload
36 upload: ${DEB}
37 tar cf - ${DEB} | ssh repoman@repo.proxmox.com upload
38
39 distclean: clean
40
41 .PHONY: clean
42 clean:
43 rm -rf ${SRCDIR}.tmp *_${ARCH}.deb *.changes *.dsc
44 find . -name '*~' -exec rm {} ';'
45
46 .PHONY: dinstall
47 dinstall: ${DEB}
48 dpkg -i ${DEB}