5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2024-12-22 13:34:06 +03:00

change from dpkg-deb to dpkg-buildpackage

Add debian directory and move the respective files there and add
missing (rules, compat, docs).

Add a Source section to the control.in file and "build" (sed
control.in >control) in the $DEB target as done in most other
packages

Move the qm verifyapi check to the new "test" target, which gets
executed before the dh_auto_install target.

Remove the obsolete vzsyscalls.ph target, vzsyscalls.h is gone for a
while now

Cleanup "clean" target.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2017-06-09 18:37:03 +02:00 committed by Fabian Grünbichler
parent e5857ca8a7
commit 88c9e28016
8 changed files with 36 additions and 31 deletions

View File

@ -28,18 +28,14 @@ DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
export NOVIEW=1
include /usr/share/pve-doc-generator/pve-doc-generator.mk
all: ${DEB}
export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp)
all:
.PHONY: dinstall
dinstall: deb
dpkg -i ${DEB}
control: control.in
sed -e s/@@VERSION@@/${VERSION}/ -e s/@@PKGRELEASE@@/${PKGREL}/ -e s/@@ARCH@@/${ARCH}/<$< >$@
vzsyscalls.ph: vzsyscalls.h
h2ph -d . vzsyscalls.h
vmtar: vmtar.c utils.c
gcc ${CFLAGS} -o vmtar vmtar.c
@ -54,7 +50,7 @@ qmrestore.bash-completion:
PVE_GENERATING_DOCS=1 perl -I. -T -e "use PVE::CLI::qmrestore; PVE::CLI::qmrestore->generate_bash_completions();" >$@.tmp
mv $@.tmp $@
PKGSOURCES=qm qm.1 qmrestore qmrestore.1 qmextract sparsecp vmtar control qm.conf.5 qm.bash-completion qmrestore.bash-completion
PKGSOURCES=qm qm.1 qmrestore qmrestore.1 qmextract sparsecp vmtar qm.conf.5 qm.bash-completion qmrestore.bash-completion
.PHONY: install
install: ${PKGSOURCES}
@ -90,26 +86,17 @@ install: ${PKGSOURCES}
.PHONY: deb
deb: ${DEB}
${DEB}: ${PKGSOURCES} check
rm -f *.deb
${DEB}:
rm -rf build
mkdir build
make DESTDIR=${CURDIR}/build install
PVE_GENERATING_DOCS=1 perl -I. ./qm verifyapi
install -d -m 0755 build/DEBIAN
install -m 0644 control build/DEBIAN
install -m 0644 triggers build/DEBIAN
echo "/etc/modules-load.d/qemu-server.conf" >>build/DEBIAN/conffiles
install -D -m 0644 copyright build/${DOCDIR}/${PACKAGE}/copyright
install -m 0644 changelog.Debian build/${DOCDIR}/${PACKAGE}/
gzip -9 -n build/${DOCDIR}/${PACKAGE}/changelog.Debian
echo "git clone git://git.proxmox.com/git/qemu-server.git\\ngit checkout ${GITVERSION}" > build/${DOCDIR}/${PACKAGE}/SOURCE
fakeroot dpkg-deb --build build
mv build.deb ${DEB}
rsync -a * build
sed -e s/@@ARCH@@/${ARCH}/ <debian/control.in >build/debian/control
echo "git clone git://git.proxmox.com/git/qemu-server.git\\ngit checkout ${GITVERSION}" > build/debian/SOURCE
cd build; dpkg-buildpackage -rfakeroot -b -us -uc
lintian ${DEB}
.PHONY: check
check: test
.PHONY: test
test:
PVE_GENERATING_DOCS=1 perl -I. ./qm verifyapi
make -C test
.PHONY: upload
@ -117,10 +104,9 @@ upload: ${DEB}
tar cf - ${DEB} | ssh repoman@repo.proxmox.com upload --product pve --dist stretch
.PHONY: clean
clean:
clean:
make cleanup-docgen
rm -rf build *.deb control vzsyscalls.ph _h2ph_pre.ph ${PACKAGE}-*.tar.gz dist *.1 *.5 *.pod vmtar sparsecp *.tmp *.bash-completion
rm -f *.buildinfo
rm -rf build *.deb *.buildinfo *.changes
find . -name '*~' -exec rm {} ';'

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
9

View File

@ -1,9 +1,13 @@
Package: qemu-server
Version: @@VERSION@@-@@PKGRELEASE@@
Source: qemu-server
Section: admin
Priority: optional
Maintainer: Proxmox Support Team <support@proxmox.com>
Build-Depends: debhelper (>= 7.0.50~), libpve-common-perl, perl (>= 5.10.0-19), lintian, pve-doc-generator
Standards-Version: 3.9.5
Homepage: http://www.proxmox.com
Package: qemu-server
Architecture: @@ARCH@@
Depends: libc6 (>= 2.7-18), perl (>= 5.10.0-19), libterm-readline-gnu-perl, pve-qemu-kvm (>= 2.2-1), libpve-access-control, libpve-storage-perl, pve-cluster, libjson-perl, libjson-xs-perl, libio-multiplex-perl, libnet-ssleay-perl, socat, pve-firewall, libuuid-perl, pve-ha-manager, dbus, libpve-common-perl (>= 4.0-92), libpve-guest-common-perl
Maintainer: Proxmox Support Team <support@proxmox.com>
Description: Qemu Server Tools
This package contains the Qemu Server tools used by Proxmox VE

View File

1
debian/docs vendored Normal file
View File

@ -0,0 +1 @@
debian/SOURCE

13
debian/rules vendored Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
%:
dh $@

View File