5
0
mirror of git://git.proxmox.com/git/pve-storage.git synced 2024-12-31 17:17:57 +03:00

change from dpkg-deb to dpkg-buildpackage

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

Move control.in to control as no sed search & replacement must be
done. Add a Source section to the control file.

Rename the "check" Makefile target to "test" so that the dh_auto_test
helper executes it automatically on build.
Move the verify_api check to this target.

Cleanup the "clean" target and remove outdated commented out stuff

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2017-06-09 17:20:09 +02:00 committed by Fabian Grünbichler
parent 488cf14d4f
commit 183d2d2d93
8 changed files with 37 additions and 25 deletions

View File

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

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
9

View File

@ -1,9 +1,13 @@
Package: libpve-storage-perl
Version: @@VERSION@@-@@PKGRELEASE@@
Source: libpve-storage-perl
Section: perl
Priority: optional
Architecture: @@ARCH@@
Depends: perl (>= 5.6.0-16), nfs-common, udev, libpve-common-perl, lvm2, thin-provisioning-tools, libfile-chdir-perl, glusterfs-client (>= 3.4.0-2), cstream, libnet-dbus-perl, smartmontools
Priority: extra
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-storage-perl
Architecture: all
Depends: perl (>= 5.6.0-16), nfs-common, udev, libpve-common-perl, lvm2, thin-provisioning-tools, libfile-chdir-perl, glusterfs-client (>= 3.4.0-2), cstream, libnet-dbus-perl, smartmontools
Description: Proxmox VE storage management library
This package contains the storage management library 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