First version of cargo-deb packaging setup

This commit is contained in:
Paul van Tilburg 2020-05-31 22:49:07 +02:00
parent 18f33b1ece
commit 79692db45d
No known key found for this signature in database
GPG key ID: C6DE073EDA9EEC4D
7 changed files with 176 additions and 0 deletions

23
debian/config vendored Normal file
View file

@ -0,0 +1,23 @@
#!/bin/sh
set -e
# Source debconf library.
. /usr/share/debconf/confmodule
CONDUIT_CONFIG_PATH=/etc/matrix-conduit
CONDUIT_CONFIG_FILE="$CONDUIT_CONFIG_PATH/env"
# Ask for the Matrix homeserver name and port.
db_input high matrix-conduit/hostname || true
db_go
db_input medium matrix-conduit/port || true
db_go
# Update the values in the config.
db_get matrix-conduit/hostname
sed -i -e "s/^ROCKET_SERVER_NAME=.*/ROCKET_SERVER_NAME=\"$RET\"/" $CONDUIT_CONFIG_FILE
db_get matrix-conduit/port
sed -i -e "s/^ROCKET_PORT=.*/ROCKET_PORT=\"$RET\"/" $CONDUIT_CONFIG_FILE
exit 0