Compare commits
No commits in common. "f6e18a796d35ec64e9d1d9b9f661c1d3c0185af6" and "f3ca37573a69495507db110661cc9cbfb319083b" have entirely different histories.
f6e18a796d
...
f3ca37573a
|
@ -18,7 +18,7 @@ steps:
|
|||
--package-arch amd64
|
||||
--apt-base $APT_BASE
|
||||
"
|
||||
--webdav-url "$WEBDAV_UPLOAD_TARGET"
|
||||
--upload-to-webdav "$WEBDAV_UPLOAD_TARGET"
|
||||
--webdav-user "$WEBDAV_USER"
|
||||
--webdav-pass "$WEBDAV_PASS"
|
||||
--package-dir packages/bin
|
||||
|
|
|
@ -10,7 +10,6 @@ maintainer="Leafee98 <me@leafee98.com>"
|
|||
|
||||
source=(
|
||||
"dendrite::git+https://github.com/matrix-org/dendrite.git#tag=v${pkgver}"
|
||||
"dendrite.service::materials/dendrite.service"
|
||||
)
|
||||
|
||||
function build {
|
||||
|
@ -23,23 +22,8 @@ function build {
|
|||
function package {
|
||||
for f in ${srcdir}/dendrite/bin/*
|
||||
do
|
||||
install -Dm755 -t "${pkgdir}/usr/lib/dendrite/" "$f";
|
||||
install -Dm755 -t "${pkgdir}/usr/local/lib/dendrite/" "$f";
|
||||
done
|
||||
|
||||
install -Dm644 "${srcdir}/dendrite/dendrite-sample.yaml" "${pkgdir}/etc/dendrite/dendrite-sample.yaml"
|
||||
install -Dm755 "${srcdir}/dendrite.service" "${pkgdir}/usr/lib/systemd/system/dendrite.service"
|
||||
}
|
||||
|
||||
function debian_postinst {
|
||||
cat << 'EOF'
|
||||
#!/usr/bin/env bash
|
||||
|
||||
adduser --system dendrite
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
if systemctl is-active --quiet dendrite.service ; then
|
||||
systemctl restart dendrite.service
|
||||
fi
|
||||
EOF
|
||||
}
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
[Unit]
|
||||
Description=matrix home server
|
||||
After=network.target
|
||||
After=postgresql.service
|
||||
After=nats-server.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=dendrite
|
||||
Group=dendrite
|
||||
ExecStart=/usr/lib/dendrite/dendrite -config /etc/dendrite/dendrite.yaml -http-bind-address 127.0.0.1:8008
|
||||
Restart=on-failure
|
||||
RestartSec=5s
|
||||
LimitNOFILE=65535
|
||||
MemoryMax=3072M
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -14,17 +14,16 @@ function msg_warn {
|
|||
|
||||
function usage {
|
||||
echo "$_PROGRAM_NAME:"
|
||||
echo " --package <dir-name> Add a dir to build, can be used multi times"
|
||||
echo " --package-dir <dir> All dir in this directory is a package,"
|
||||
echo " --package <dir-name> add a dir to build, can use multi times"
|
||||
echo " --package-dir <dir> all dir in this directory is a package,"
|
||||
echo " can use multi times"
|
||||
echo " --makedeb-path <path> Specify the path of makedeb"
|
||||
echo " --no-upload Don't upload built packages to webdav"
|
||||
echo " --webdav-url https://webdav_host/path/dir"
|
||||
echo " Upload built file to a webdav server"
|
||||
echo " --webdav-user <username> Username of webdav server (if required)"
|
||||
echo " --webdav-pass <password> Password of webdav server (if required)"
|
||||
echo " --makedeb-path <path> specify the path of makedeb"
|
||||
echo " --upload-to-webdav https://webdav_host/path/dir"
|
||||
echo " upload built file to a webdav server"
|
||||
echo " --webdav-user <username> username of webdav server (if required)"
|
||||
echo " --webdav-pass <password> password of webdav server (if required)"
|
||||
echo ' --package-exists-hook "/path/to/hook --args {}"'
|
||||
echo " This program will run the hook to check"
|
||||
echo " this program will run the hook to check"
|
||||
echo " if specific file already built, the {} will"
|
||||
echo " be replaced with the final package name,"
|
||||
echo " exit with 0 means package exists"
|
||||
|
@ -69,8 +68,7 @@ _DELIMITER="================================================================"
|
|||
_PROGRAM_NAME="$0"
|
||||
_PACKGES_TO_BUILD=()
|
||||
MAKEDEB_PATH=""
|
||||
UPLOAD_TO_WEBDAV=1
|
||||
WEBDAV_URL=""
|
||||
UPLOAD_TO_WEBDAV=""
|
||||
WEBDAV_USER=""
|
||||
WEBDAV_PASS=""
|
||||
PACKAGE_DIR=()
|
||||
|
@ -82,8 +80,7 @@ while (( "$#" >= 1 )); do
|
|||
--package) _PACKGES_TO_BUILD+=("$2") ; shift ;;
|
||||
--package-dir) PACKAGE_DIR+=("$2") ; shift ;;
|
||||
--makedeb-path) MAKEDEB_PATH="$2" ; shift ;;
|
||||
--no-upload) UPLOAD_TO_WEBDAV=0 ;;
|
||||
--webdav-url) WEBDAV_URL="$2" ; shift ;;
|
||||
--upload-to-webdav) UPLOAD_TO_WEBDAV="$2" ; shift ;;
|
||||
--webdav-user) WEBDAV_USER="$2" ; shift ;;
|
||||
--webdav-pass) WEBDAV_PASS="$2" ; shift ;;
|
||||
--package-exists-hook)
|
||||
|
@ -185,9 +182,9 @@ for package in "${_PACKGES_TO_BUILD[@]}" ; do
|
|||
exit 4
|
||||
fi
|
||||
|
||||
if [[ -n "${WEBDAV_URL}" ]] && (( UPLOAD_TO_WEBDAV )) ; then
|
||||
msg_info "Uploading $package_name to $WEBDAV_URL"
|
||||
upload_to_webdav "$package_name" "$WEBDAV_URL" "$WEBDAV_USER" "$WEBDAV_PASS"
|
||||
if [[ -n "${UPLOAD_TO_WEBDAV}" ]] ; then
|
||||
msg_info "Uploading $package_name to $UPLOAD_TO_WEBDAV"
|
||||
upload_to_webdav "$package_name" "$UPLOAD_TO_WEBDAV" "$WEBDAV_USER" "$WEBDAV_PASS"
|
||||
fi
|
||||
) || true
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ APT_BASE=https://dufs.leafee98.com/apt
|
|||
--package-dir packages/normal \
|
||||
-- \
|
||||
-f
|
||||
# --webdav-url "$WEBDAV_UPLOAD_TARGET" \
|
||||
# --upload-to-webdav "$WEBDAV_UPLOAD_TARGET" \
|
||||
# --webdav-user "$WEBDAV_USER" \
|
||||
# --webdav-pass "$WEBDAV_PASS" \
|
||||
|
||||
|
|
Loading…
Reference in a new issue