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