]> git.proxmox.com Git - smartmontools.git/blame - Makefile
smartd service: never quit to avoid service failure if no dev
[smartmontools.git] / Makefile
CommitLineData
bd4e7d8b 1PACKAGE=smartmontools
320039ad
TL
2VER=7.0
3DEBREL=pve1
bd4e7d8b 4
6eeaeb72 5SRCDIR=smartmontools
bd4e7d8b
FG
6
7ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
8GITVERSION:=$(shell cat .git/refs/heads/master)
9
10DEB=${PACKAGE}_${VER}-${DEBREL}_${ARCH}.deb
11
12all: ${DEB}
e923c21a 13 @echo ${DEB}
bd4e7d8b 14
e923c21a 15.PHONY: deb
4226ccbc 16deb ${DEB}: | submodule
b5191b6c 17 rm -rf ${SRCDIR}.tmp
bd4e7d8b
FG
18 cp -rpa ${SRCDIR} ${SRCDIR}.tmp
19 cd ${SRCDIR}.tmp; patch -p1 < ../patches/update_changelog.patch
2e71a4cf 20 cd ${SRCDIR}.tmp; patch -p1 < ../patches/0001-update-debian-patches-for-7.0.patch
10b5bd74 21 cd ${SRCDIR}.tmp; patch -p1 < ../patches/smartd.service-never-quit.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}