VERSION != dpkg-parsechangelog -Sversion | cut -d- -f1 PACKAGE != dpkg-parsechangelog -Ssource PKGREL != dpkg-parsechangelog -Sversion | cut -d- -f2 # h2xs -Afn LibArchive # h2xs -an LibArchive /usr/include/archive.h /usr/include/archive_entry.h # perl Makefile.PL PREFIX=/usr PPSRC = LibArchive ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) GITVERSION:=$(shell git rev-parse HEAD) BUILDSRC=${PACKAGE}-${VERSION} DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb DSC=${PACKAGE}_${VERSION}-${PKGREL}.dsc all: ${DEB} .PHONY: ${BUILDSRC} ${BUILDSRC}: rm -rf ${BUILDSRC} rsync -a --exclude .svn ${PPSRC}/ ${BUILDSRC} cp -a debian ${BUILDSRC} echo "git clone git://git.proxmox.com/git/pve-storage.git\\ngit checkout ${GITVERSION}" >${BUILDSRC}/debian/SOURCE .PHONY: dsc dsc: ${DSC} ${DSC}: ${BUILDSRC} cd ${BUILDSRC}; dpkg-buildpackage -S -us -uc -d -nc lintian ${DSC} .PHONY: deb deb: ${DEB} ${DEB}: ${PPSRC}/LibArchive.xs ${BUILDSRC} cd ${BUILDSRC}; dpkg-buildpackage -b -us -uc -rfakeroot lintian ${DEB} .phony: upload upload: ${DEB} tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist stretch CLEANFILES = *~ build *.deb libarchive_* libarchive-perl_* ${BUILDSRC} .phony: clean clean: rm -rf ${CLEANFILES} .PHONY: dinstall dinstall: ${DEB} dpkg -i ${DEB}