mirror of
https://gitlab.com/famedly/conduit.git
synced 2025-04-22 14:10:16 +03:00
Merge branch 'snapcraft' into 'next'
Add Snapcraft metadata See merge request famedly/conduit!8
This commit is contained in:
commit
0da1a0d002
3 changed files with 106 additions and 0 deletions
snap
31
snap/hooks/configure
vendored
Normal file
31
snap/hooks/configure
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/sh
|
||||
|
||||
base_url="$(snapctl get base-url)"
|
||||
enabled="$(snapctl get enabled)"
|
||||
|
||||
if [ -n ${enabled} -a \( "${enabled}" != "true" -a "${enabled}" != "false" \) ]
|
||||
then
|
||||
echo "Invalid 'enabled' setting: ${enabled}. Valid values are 'true' or 'false'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -n ${base_url} -a \( -z "${enabled}" -o "${enabled}" = "false" \) ]
|
||||
then
|
||||
echo "All required configuration available."
|
||||
echo "Conduit can now be enabled by setting 'snap set conduit enabled=true' and restarting the service \
|
||||
with 'snap restart conduit'"
|
||||
fi
|
||||
|
||||
federation_enabled=$(snapctl get federation)
|
||||
if [ -n ${federation_enabled} -a \( "${federation_enabled}" != "true" -a "${federation_enabled}" != "false" \) ]
|
||||
then
|
||||
echo "Invalid 'federation' setting: ${federation_enabled}. Valid values are 'true' or 'false'"
|
||||
fi
|
||||
|
||||
registration_enabled=$(snapctl get registration)
|
||||
if [ -n ${registration_enabled} -a \( "${registration_enabled}" != "true" -a "${registration_enabled}" != "false" \) ]
|
||||
then
|
||||
echo "Invalid 'registration' setting: ${registration_enabled}. Valid values are 'true' or 'false'"
|
||||
fi
|
||||
|
||||
exit 0
|
35
snap/local/set-environment
Executable file
35
snap/local/set-environment
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/bin/sh
|
||||
|
||||
enabled="$(snapctl get enabled)"
|
||||
if [ -z "${enabled}" -o "${enabled}" != "true" ]
|
||||
then
|
||||
echo "Conduit not yet enabled"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
export ROCKET_SERVER_NAME="$(snapctl get base-url)"
|
||||
|
||||
listen_address="$(snapctl get listen.address)"
|
||||
if [ -n "${listen_address}" ]
|
||||
then
|
||||
export ROCKET_ADDRESS="$(snapctl get listen.address)"
|
||||
export ROCKET_PORT="$(snapctl get listen.port)"
|
||||
fi
|
||||
|
||||
federation_enabled="$(snapctl get federation)"
|
||||
if [ -n "${federation_enabled}" ]
|
||||
then
|
||||
export ROCKET_FEDERATION_ENABLED=${federation_enabled}
|
||||
fi
|
||||
|
||||
registration_enabled="$(snapctl get registration)"
|
||||
if [ -n "${registration_enabled}" -a "${registration_enabled}" = "false" ]
|
||||
then
|
||||
export ROCKET_REGISTRATION_DISABLED="true"
|
||||
fi
|
||||
|
||||
export ROCKET_ENV="production"
|
||||
export ROCKET_DATABASE_PATH=${SNAP_DATA}
|
||||
|
||||
cd ${SNAP}
|
||||
exec $@
|
40
snap/snapcraft.yaml
Normal file
40
snap/snapcraft.yaml
Normal file
|
@ -0,0 +1,40 @@
|
|||
name: conduit
|
||||
base: core20
|
||||
version: git
|
||||
summary: A Matrix homeserver written in Rust
|
||||
description: |
|
||||
A fast Matrix homeserver that's easy to set up and just works. You can
|
||||
install it on a mini-computer like the Raspberry Pi to host Matrix for
|
||||
your family, friends or company.
|
||||
|
||||
Conduit is under heavy development, and many features of a fully-functional
|
||||
Matrix server are incomplete or missing, but
|
||||
|
||||
What are the biggest things still missing?
|
||||
* Appservices (Bridges and Bots)
|
||||
* Most federation features (invites, e2ee)
|
||||
* Push notifications on mobile
|
||||
* Notification settings
|
||||
* Lots of testing
|
||||
|
||||
grade: devel # must be 'stable' to release into candidate/stable channels
|
||||
confinement: strict # use 'strict' once you have the right plugs and slots
|
||||
|
||||
apps:
|
||||
conduit:
|
||||
daemon: simple
|
||||
command: set-environment bin/conduit
|
||||
plugs:
|
||||
- network
|
||||
- network-bind
|
||||
|
||||
parts:
|
||||
conduit:
|
||||
plugin: rust
|
||||
source: .
|
||||
build-packages:
|
||||
- libssl-dev
|
||||
- pkg-config
|
||||
snap-helper:
|
||||
plugin: dump
|
||||
source: snap/local/
|
Loading…
Reference in a new issue