build: fix Debian packaging if swtpm_cert is missing

Fix the Debian packaging if swtpm_cert is missing. We convert
swtpm-tools.install into an executable shell script that displays
all files to package.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
Stefan Berger 2016-09-27 17:26:03 -04:00
parent 82693130d0
commit 2cd10cee2f
2 changed files with 6 additions and 9 deletions

7
debian/rules vendored
View File

@ -7,11 +7,4 @@ override_dh_auto_configure:
./bootstrap.sh
dh_auto_configure -- --with-openssl
override_dh_install:
EXCLUDES=""
if test -z $(find debian/tmp -name swtpm_cert); then \
EXCLUDES="-Xswtpm_cert"; \
fi ; \
dh_install $$EXCLUDES --
override_dh_usrlocal:

8
debian/swtpm-tools.install vendored Normal file → Executable file
View File

@ -1,6 +1,6 @@
#! /usr/bin/dh-exec
#!/bin/sh
cat <<_EOF_
/usr/bin/swtpm_bios
/usr/bin/swtpm_cert
/usr/bin/swtpm_setup
/usr/bin/swtpm_setup.sh
/usr/bin/swtpm_ioctl
@ -13,3 +13,7 @@
/usr/share/man/man8/swtpm_setup.8*
/usr/share/man/man8/swtpm_setup.conf.8*
/usr/share/man/man8/swtpm_setup.sh.8*
_EOF_
if test -n "$(find $(dirname "$0")/tmp -name swtpm_cert)"; then
echo "/usr/bin/swtpm_cert"
fi