]> git.proxmox.com Git - smartmontools.git/blob - Makefile
7b9a5da806b625af2b365fe977a821d3d68dbc84
[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 .PHONY: deb
18 deb ${DEB}: | submodule
19 rm -rf ${SRCDIR}.tmp
20 cp -rpa ${SRCDIR} ${SRCDIR}.tmp
21 cd ${SRCDIR}.tmp; patch -p1 < ../patches/update_changelog.patch
22 cd ${SRCDIR}.tmp; patch -p1 < ../patches/0001-update-debian-patches-for-7.0.patch
23 echo "git clone git://git.proxmox.com/git/smartmontools.git\\ngit checkout ${GITVERSION}" > ${SRCDIR}.tmp/debian/SOURCE
24 echo "debian/SOURCE" >> ${SRCDIR}.tmp/debian/docs
25 cd ${SRCDIR}.tmp; dpkg-buildpackage -rfakeroot -b -uc -us
26 lintian ${DEB}
27 @echo ${DEB}
28
29 # make sure submodule was initialized
30 .PHONY: submodule
31 submodule:
32 test -f "${SRCDIR}/debian/changelog" || git submodule update --init
33
34 # upgrade to current master
35 .PHONY: download
36 download ${SRCDIR}: submodule
37 git submodule foreach 'git pull --ff-only origin master'
38
39 .PHONY: upload
40 upload: ${DEB}
41 tar cf - ${DEB} | ssh repoman@repo.proxmox.com upload
42
43 distclean: clean
44
45 .PHONY: clean
46 clean:
47 rm -rf ${SRCDIR}.tmp *_${ARCH}.deb *.changes *.dsc
48 find . -name '*~' -exec rm {} ';'
49
50 .PHONY: dinstall
51 dinstall: ${DEB}
52 dpkg -i ${DEB}