X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Makefile;fp=Makefile;h=9eed3b143b552575a7f63af26826c54239cfe73f;hb=9d315569ca2bd278377f21b58bda02b41214a923;hp=890d4fb2f134651f3a4310fcbac2e00b22137e0f;hpb=561f47cf4848128832118a0d7d5dcb8fbd9a39ea;p=libarchive-perl.git diff --git a/Makefile b/Makefile index 890d4fb..9eed3b1 100644 --- a/Makefile +++ b/Makefile @@ -6,27 +6,42 @@ PKGREL != dpkg-parsechangelog -Sversion | cut -d- -f2 # h2xs -an LibArchive /usr/include/archive.h /usr/include/archive_entry.h # perl Makefile.PL PREFIX=/usr -#OPKGNAME = libarchive-2.2.4 -#DEB = libarchive1_2.2.4-1_i386.deb -#DEVDEB = libarchive-dev_2.2.4-1_i386.deb PPSRC = LibArchive -DEB = libarchive-perl_3.2.1-1_amd64.deb + +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} -${DEB}: ${PPSRC}/LibArchive.xs - -rm -rf build - rsync -a --exclude .svn ${PPSRC}/ build/ - cp -a debian build - cd build; dpkg-buildpackage -b -us -uc -rfakeroot +.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_* ${OPKGNAME} libarchive-perl_* +CLEANFILES = *~ build *.deb libarchive_* libarchive-perl_* ${BUILDSRC} .phony: clean clean: