[pve-devel] [PATCH 1/4] initial Makefile

Thomas Lamprecht t.lamprecht at proxmox.com
Thu May 23 21:25:00 CEST 2019


FYI: Followed up with two small changes required to make dinstall target
work (see inline) and now run lintian on resulting deb target debs, as we
do in other packages.

On 5/22/19 3:37 PM, Fabian Grünbichler wrote:
> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> ---
>  Makefile | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 59 insertions(+)
>  create mode 100644 Makefile
> 
> diff --git a/Makefile b/Makefile
> new file mode 100644
> index 0000000..db1f7a9
> --- /dev/null
> +++ b/Makefile
> @@ -0,0 +1,59 @@
> +VERSION=1.8
> +DEBRELEASE=2
> +PVERELEASE=1

..=pve1
s/1/pve1/

> +
> +BUILDDIR=kronosnet-${VERSION}
> +SRCARCHIVE=kronosnet_${VERSION}.orig.tar.xz
> +DEBARCHIVE=kronosnet_${VERSION}-${DEBRELEASE}.debian.tar.xz
> +
> +ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
> +
> +MAIN_DEB=libknet1_${VERSION}-${PVERELEASE}_${ARCH}.deb
> +OTHER_DEBS=								\
> +	libknet-dev_${VERSION}-${PVERELEASE}_${ARCH}.deb			\
> +	libknet-doc_${VERSION}-${PVERELEASE}_all.deb			\
> +	libknet1-dbgsym_${VERSION}-${PVERELEASE}_${ARCH}.deb		\
> +	libnozzle1-dbgsym_${VERSION}-${PVERELEASE}_${ARCH}.deb		\
> +	libnozzle1-dev_${VERSION}-${PVERELEASE}_${ARCH}.deb		\

s/libnozzle1-dev/libnozzle-dev/

> +
> +DEBS=${MAIN_DEB} ${OTHER_DEBS}
> +DSC=kronosnet-${VERSION}-${PVERELEASE}.dsc
> +
> +all: ${DEBS}
> +	echo ${DEBS}
> +
> +${BUILDDIR}: upstream/${SRCARCHIVE} upstream/${DEBARCHIVE} patches/*
> +	rm -rf ${BUILDDIR}
> +	ln -sf upstream/${SRCARCHIVE} ${SRCARCHIVE}
> +	tar -xf upstream/${SRCARCHIVE}
> +	tar -C ${BUILDDIR} -xf upstream/${DEBARCHIVE}
> +	cd ${BUILDDIR}; ln -s ../patches patches
> +	cd ${BUILDDIR}; quilt push -a
> +	cd ${BUILDDIR}; rm -rf .pc ./patches
> +
> +deb: ${DEBS}
> +${OTHER_DEBS}: ${MAIN_DEB}
> +${MAIN_DEB}: ${BUILDDIR}
> +	cd ${BUILDDIR}; dpkg-buildpackage -b -us -uc
> +
> +dsc: ${DSC}
> +${DSC}: ${BUILDDIR}
> +	cd ${BUILDDIR}; dpkg-buildpackage -S -us -uc -d -nc
> +
> +download:
> +	rm -rf upstream/
> +	mkdir upstream
> +	cd upstream; dget https://deb.debian.org/debian/pool/main/k/kronosnet/kronosnet_${VERSION}-${DEBRELEASE}.dsc
> +	cd upstream; rm -rf *.asc *.dsc ${BUILDDIR}
> +
> +.PHONY: upload
> +upload: ${DEBS}
> +	tar cf - ${DEBS} | ssh repoman at repo.proxmox.com upload
> +
> +.PHONY: clean
> +clean:
> +	rm -rf *~ *_${ARCH}.deb *.changes *.dsc ${BUILDDIR} *.orig.tar.xz *.debian.tar.xz *.buildinfo
> +
> +.PHONY: dinstall
> +dinstall: ${DEBS}
> +	dpkg -i ${DEBS}
> 






More information about the pve-devel mailing list