-RELEASE=3.0
+include /usr/share/dpkg/default.mk
PACKAGE=ksm-control-daemon
-# also update debian/changelog
-PKGVER=1.1
-PKGREL=1
+KSM_DEB=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_all.deb
-KSM_DEB=${PACKAGE}_${PKGVER}-${PKGREL}_all.deb
-
-GITVERSION:=$(shell cat .git/refs/heads/master)
+GITVERSION:=$(shell git rev-parse HEAD)
all: ${KSM_DEB}
rsync -a --exclude .git ksm-control-scripts.org/ ksm-control-scripts
cp -a debian ksm-control-scripts
echo "git clone git://git.proxmox.com/git/ksm-control-daemon.git\\ngit checkout ${GITVERSION}" > ksm-control-scripts/debian/SOURCE
- cd ksm-control-scripts; dpkg-buildpackage -b -rfakeroot -us -uc
+ cd ksm-control-scripts; dpkg-buildpackage -b -us -uc
lintian ${KSM_DEB} || true
.PHONY: download
touch $@
.PHONY: upload
+upload: UPLOAD_DIST ?= $(DEB_DISTRIBUTION)
upload: ${KSM_DEB}
- umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
- mkdir -p /pve/${RELEASE}/extra
- rm -rf /pve/${RELEASE}/extra/Packages*
- rm -rf /pve/${RELEASE}/extra/${PACKAGE}_*.deb
- cp ${KSM_DEB} /pve/${RELEASE}/extra
- cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
- umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
+ tar cf - ${KSM_DEB} | ssh repoman@repo.proxmox.com -- upload --product pve --dist ${UPLOAD_DIST}
.PHONY: distclean
distclean: clean
clean:
rm -rf *~ ksm-control-scripts ${PACKAGE}_*
+.PHONY: deb
+deb: ${KSM_DEB}
+
.PHONY: dinstall
dinstall: ${KSM_DEB}
dpkg -i ${KSM_DEB}