-RELEASE=4.0
+include /usr/share/dpkg/pkg-info.mk
+include /usr/share/dpkg/architecture.mk
PACKAGE=criu
-PKGVER=1.6.0
-DEBREL=1
SRCDIR=criu
SRCTAR=${SRCDIR}.tgz
-ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
GITVERSION:=$(shell cat .git/refs/heads/master)
-DEBS= \
-${PACKAGE}_${PKGVER}-${DEBREL}_amd64.deb \
-${PACKAGE}-dbg_${PKGVER}-${DEBREL}_amd64.deb
+DEB1=${PACKAGE}_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
+DEB_DBG=${PACKAGE}-dbgsym_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
+DEBS=$(DEB1) $(DEB_DBG)
all: ${DEBS}
echo ${DEBS}
-deb ${DEBS}: ${SRCTAR}
+.PHONY: deb
+deb $(DEB_DBG): $(DEB1)
+$(DEB1): $(SRCTAR)
rm -rf ${SRCDIR}
tar xf ${SRCTAR}
- cp -a debian ${SRCDIR}/debian
+ mv ${SRCDIR}/debian/changelog ${SRCDIR}/debian/changelog.org
+ cat debian/changelog ${SRCDIR}/debian/changelog.org > ${SRCDIR}/debian/changelog
echo "git clone git://git.proxmox.com/git/criu.git\\ngit checkout ${GITVERSION}" > ${SRCDIR}/debian/SOURCE
- cd ${SRCDIR}; dpkg-buildpackage -rfakeroot -b -us -uc
+ cd ${SRCDIR}; dpkg-buildpackage -b -us -uc
lintian ${DEBS}
.PHONY: download
-download ${SRCTAR}:
- rm -rf ${SRCDIR} ${SRCTAR} ${SRCTAR}.tmp
- git clone https://github.com/xemul/${SRCDIR}
- tar czf ${SRCTAR}.tmp ${SRCDIR}
+download:
+ rm -rf ${SRCDIR} ${SRCTAR}
+ git clone -b debian/3.11-2 https://anonscm.debian.org/git/collab-maint/criu.git ${SRCDIR}
+ tar czf ${SRCTAR}.tmp --exclude=.git ${SRCDIR}
mv ${SRCTAR}.tmp ${SRCTAR}
.PHONY: upload
upload: ${DEBS}
- umount /pve/${RELEASE}; mount /pve/${RELEASE} -o rw
- mkdir -p /pve/${RELEASE}/extra
- rm -f /pve/${RELEASE}/extra/${PACKAGE}_*.deb
- rm -f /pve/${RELEASE}/extra/${PACKAGE}-dbg_*.deb
- rm -f /pve/${RELEASE}/extra/Packages*
- cp ${DEBS} /pve/${RELEASE}/extra
- cd /pve/${RELEASE}/extra; dpkg-scanpackages . /dev/null > Packages; gzip -9c Packages > Packages.gz
- umount /pve/${RELEASE}; mount /pve/${RELEASE} -o ro
+ tar cf - ${DEBS} | ssh repoman@repo.proxmox.com -- upload --product pve --dist buster --arch ${DEB_BUILD_ARCH}
distclean: clean
.PHONY: clean
clean:
- rm -rf ${SRCDIR} ${SRCDIR}.tmp *_${ARCH}.deb *.changes *.dsc
+ rm -rf ${SRCDIR} ${SRCDIR}.tmp *_${DEB_BUILD_ARCH}.deb *.changes *.dsc *.buildinfo
find . -name '*~' -exec rm {} ';'
.PHONY: dinstall