change from dpkg-deb to dpkg-buildpackage

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

Add a Source section to the control.in file.

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

Cleanup the "clean" target.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2017-06-09 17:44:29 +02:00 committed by Fabian Grünbichler
parent 868fb1eae5
commit 98eb404f77
8 changed files with 35 additions and 19 deletions

View File

@ -13,6 +13,8 @@ BASHCOMPLDIR=${PREFIX}/share/bash-completion/completions/
export PERLDIR=${PREFIX}/share/perl5 export PERLDIR=${PREFIX}/share/perl5
export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp)
ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH) ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
GITVERSION:=$(shell cat .git/refs/heads/master) GITVERSION:=$(shell cat .git/refs/heads/master)
@ -22,7 +24,7 @@ DEB=${PACKAGE}_${VERSION}-${PKGREL}_${ARCH}.deb
export NOVIEW=1 export NOVIEW=1
include /usr/share/pve-doc-generator/pve-doc-generator.mk include /usr/share/pve-doc-generator/pve-doc-generator.mk
all: ${DEB} all:
.PHONY: dinstall .PHONY: dinstall
dinstall: deb dinstall: deb
@ -39,30 +41,25 @@ install: pveum.1 oathkeygen pveum.bash-completion
install -m 0755 pveum ${DESTDIR}${SBINDIR} install -m 0755 pveum ${DESTDIR}${SBINDIR}
install -m 0755 oathkeygen ${DESTDIR}${BINDIR} install -m 0755 oathkeygen ${DESTDIR}${BINDIR}
make -C PVE install make -C PVE install
perl -I. ./pveum verifyapi
perl -I. -T -e "use PVE::CLI::pveum; PVE::CLI::pveum->verify_api();"
install -d ${DESTDIR}/${MAN1DIR} install -d ${DESTDIR}/${MAN1DIR}
install -d ${DESTDIR}/${DOCDIR} install -d ${DESTDIR}/${DOCDIR}
install -m 0644 pveum.1 ${DESTDIR}/${MAN1DIR} install -m 0644 pveum.1 ${DESTDIR}/${MAN1DIR}
gzip -9 -n ${DESTDIR}/${MAN1DIR}/pveum.1 gzip -9 -n ${DESTDIR}/${MAN1DIR}/pveum.1
install -m 0644 -D pveum.bash-completion ${DESTDIR}${BASHCOMPLDIR}/pveum install -m 0644 -D pveum.bash-completion ${DESTDIR}${BASHCOMPLDIR}/pveum
.PHONY: test
test:
perl -I. ./pveum verifyapi
perl -I. -T -e "use PVE::CLI::pveum; PVE::CLI::pveum->verify_api();"
.PHONY: deb .PHONY: deb
deb: ${DEB} deb: ${DEB}
${DEB}: ${DEB}:
rm -rf build rm -rf build
mkdir build rsync -a * build
make DESTDIR=`pwd`/build install sed -e s/@@ARCH@@/${ARCH}/ <debian/control.in >build/debian/control
install -d -m 0755 build/DEBIAN echo "git clone git://git.proxmox.com/git/pve-access-control.git\\ngit checkout ${GITVERSION}" >build/debian/SOURCE
sed -e s/@@VERSION@@/${VERSION}/ -e s/@@PKGRELEASE@@/${PKGREL}/ -e s/@@ARCH@@/${ARCH}/ <control.in >build/DEBIAN/control cd build; dpkg-buildpackage -rfakeroot -b -us -uc
echo "git clone git://git.proxmox.com/git/pve-access-control.git\\ngit checkout ${GITVERSION}" > build/${DOCDIR}/SOURCE
install -m 0644 triggers build/DEBIAN
install -D -m 0644 copyright build/${DOCDIR}/copyright
install -m 0644 changelog.Debian build/${DOCDIR}/
gzip -9 -n build/${DOCDIR}/changelog.Debian
fakeroot dpkg-deb --build build
mv build.deb ${DEB}
#rm -rf build
lintian ${DEB} lintian ${DEB}
.PHONY: upload .PHONY: upload
@ -72,7 +69,7 @@ upload: ${DEB}
.PHONY: clean .PHONY: clean
clean: clean:
make cleanup-docgen make cleanup-docgen
rm -rf build *~ *.deb ${PACKAGE}-*.tar.gz pveum.1 rm -rf build *.deb *.buildinfo *.changes
find . -name '*~' -exec rm {} ';' find . -name '*~' -exec rm {} ';'
.PHONY: distclean .PHONY: distclean

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
9

View File

@ -1,10 +1,14 @@
Package: libpve-access-control Source: libpve-access-control
Version: @@VERSION@@-@@PKGRELEASE@@
Section: perl Section: perl
Priority: optional 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: libpve-access-control
Architecture: @@ARCH@@ Architecture: @@ARCH@@
Depends: libc6 (>= 2.3), perl (>= 5.6.0-16), libcrypt-openssl-rsa-perl, libcrypt-openssl-random-perl, libjson-xs-perl, libjson-perl, libterm-readline-gnu-perl,libnet-ldap-perl, libpve-common-perl, pve-cluster, libauthen-pam-perl, libnet-ssleay-perl, liburi-perl, libwww-perl, libmime-base32-perl Depends: libc6 (>= 2.3), perl (>= 5.6.0-16), libcrypt-openssl-rsa-perl, libcrypt-openssl-random-perl, libjson-xs-perl, libjson-perl, libterm-readline-gnu-perl,libnet-ldap-perl, libpve-common-perl, pve-cluster, libauthen-pam-perl, libnet-ssleay-perl, liburi-perl, libwww-perl, libmime-base32-perl
Maintainer: Proxmox Support Team <support@proxmox.com>
Description: Proxmox VE access control library Description: Proxmox VE access control library
This package contains the role based user management and access This package contains the role based user management and access
control function used by Proxmox VE. control function 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