]> git.proxmox.com Git - smartmontools.git/blobdiff - Makefile
bump version to 7.2-pve1
[smartmontools.git] / Makefile
index e1b32cc1c3dd45162054a1f2017b5fa68a289742..3fd6650ab0d25dbd49f361605b0ab31a4baa1a3d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,8 @@
-RELEASE=4.3
-
 PACKAGE=smartmontools
-VER=6.5+svn4324
-DEBREL=1~pve80
+VER=7.2
+DEBREL=pve1
 
-SRCDIR=upstream
+SRCDIR=smartmontools
 
 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
 GITVERSION:=$(shell cat .git/refs/heads/master)
@@ -12,20 +10,28 @@ GITVERSION:=$(shell cat .git/refs/heads/master)
 DEB=${PACKAGE}_${VER}-${DEBREL}_${ARCH}.deb
 
 all: ${DEB}
-       echo ${DEB}
+       @echo ${DEB}
 
-deb ${DEB}: ${SRCDIR}
+.PHONY: deb
+deb ${DEB}: | submodule
+       rm -rf ${SRCDIR}.tmp
        cp -rpa ${SRCDIR} ${SRCDIR}.tmp
+       rm -rf ${SRCDIR}.tmp/.git
        cd ${SRCDIR}.tmp; patch -p1 < ../patches/update_changelog.patch
+       echo "git clone git://git.proxmox.com/git/smartmontools.git\\ngit checkout ${GITVERSION}" >  ${SRCDIR}.tmp/debian/SOURCE
+       echo "debian/SOURCE" >> ${SRCDIR}.tmp/debian/docs
        cd ${SRCDIR}.tmp; dpkg-buildpackage -rfakeroot -b -uc -us
        lintian ${DEB}
-       echo ${DEB}
 
+# make sure submodule was initialized
+.PHONY: submodule
+submodule:
+       test -f "${SRCDIR}/debian/changelog" || git submodule update --init
+
+# upgrade to current master
 .PHONY: download
-download ${SRCDIR}:
-       git submodule update --init
-       cd ${SRCDIR}; git fetch
-       cd ${SRCDIR}; git merge --ff-only master
+download ${SRCDIR}: submodule
+       git submodule foreach 'git pull --ff-only origin master'
 
 .PHONY: upload
 upload: ${DEB}
@@ -35,7 +41,7 @@ distclean: clean
 
 .PHONY: clean
 clean:
-       rm -rf ${SRCDIR}.tmp *_${ARCH}.deb *.changes *.dsc 
+       rm -rf ${SRCDIR}.tmp *_${ARCH}.deb *.changes *.dsc *.buildinfo
        find . -name '*~' -exec rm {} ';'
 
 .PHONY: dinstall