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