include /usr/share/dpkg/pkg-info.mk
include /usr/share/dpkg/architecture.mk
-PACKAHE=libxdgmime
+PACKAGE=libxdgmime
DEB = libxdgmime-perl_${DEB_VERSION_UPSTREAM_REVISION}_${DEB_BUILD_ARCH}.deb
+BUILDSRC=${PACKAGE}-${DEB_VERSION_UPSTREAM}
OPKGNAME=Xdgmime
UPSTREAM=xdgmime-source/src
-${DEB}: ${OPKGNAME}/Xdgmime.xs
- -rm -rf build
- cp -a ${OPKGNAME} build
- cp -a ${UPSTREAM}/xdgmime*.[ch] build/
- perl -MDevel::PPPort -e 'Devel::PPPort::WriteFile("build/ppport.h");'
- cp -a debian build
- cd build; dpkg-buildpackage -b -us -uc -rfakeroot
+all: ${DEB}
+
+.PHONY: ${BUILDSRC}
+${BUILDSRC}:
+ -rm -rf ${BUILDSRC}
+ cp -a ${OPKGNAME} ${BUILDSRC}
+ cp -a ${UPSTREAM}/xdgmime*.[ch] ${BUILDSRC}/
+ perl -MDevel::PPPort -e 'Devel::PPPort::WriteFile("${BUILDSRC}/ppport.h");'
+ cp -a debian ${BUILDSRC}
+
+.PHONY: deb
+deb: ${DEB}
+${DEB}: ${OPKGNAME}/Xdgmime.xs ${BUILDSRC}
+ cd ${BUILDSRC}; dpkg-buildpackage -b -us -uc
lintian ${DEB}
.PHONY: upload
tar cf - ${DEB} | ssh -X repoman@repo.proxmox.com -- upload --product pmg --dist stretch
-CLEANFILES = *~ debian/*~ *.deb build libxdgmime-perl_*
+CLEANFILES = *~ debian/*~ *.deb ${BUILDSRC} libxdgmime-perl_*
.PHONY: clean
clean: