Compare commits

...

2 commits

Author SHA1 Message Date
leafee98 5021f561e9 update dendrite to 0.13.8
All checks were successful
ci/woodpecker/push/build Pipeline was successful
2024-03-12 17:36:49 +08:00
leafee98 16ef2d96d5 add pasty-git 2024-03-12 17:36:16 +08:00
4 changed files with 74 additions and 2 deletions

View file

@ -0,0 +1,53 @@
#/usr/bin/env bash
pkgname="pasty-git"
arch="amd64"
pkgrel=1
pkgver=20240312172222-39b75df
pkgdesc="pasty is a fast and lightweight code pasting server"
url="https://github.com/leafee98/pasty"
maintainer="Leafee98 <me@leafee98.com>"
source=(
"pasty::git+https://github.com/leafee98/pasty.git"
"pasty.service::materials/pasty.service"
"env::materials/env"
)
function pkgver {
echo "$(date +%Y%m%d%H%M%S)-$(git rev-parse --short HEAD)"
}
function build {
(
cd ${srcdir}/pasty
go build -o pasty ./cmd/pasty/main.go
)
}
function package {
install -Dm755 ${srcdir}/pasty/pasty ${pkgdir}/usr/lib/pasty/pasty
install -Dm644 ${srcdir}/pasty/LICENSE ${pkgdir}/usr/share/licenses/pasty/LICENSE
cp -r ${srcdir}/pasty/web ${pkgdir}/usr/lib/pasty/web
install -Dm644 ${srcdir}/pasty.service ${pkgdir}/usr/lib/systemd/system/pasty.service
# We haven't implement the 'conffiles', so don't create this file in case override user's config
#install -Dm644 ${srcdir}/env ${pkgdir}/etc/pasty/env
}
function debian_postinst {
cat << 'EOF'
#!/usr/bin/env bash
service_name="pasty.service"
adduser --system --group pasty
chown -R pasty:pasty /usr/lib/pasty
systemctl daemon-reload
if systemctl is-active --quiet ${service_name} ; then
systemctl restart ${service_name}
fi
EOF
}

View file

@ -0,0 +1 @@
# See README on https://github.com/lus/pasty

View file

@ -0,0 +1,18 @@
[Unit]
Description=Pasty is a fast and lightweight code pasting server
After=network.target
[Service]
User=pasty
# Here store the configs
EnvironmentFile=/etc/pasty/env
# Start program here, the pasty read `./web` to find the front pages
WorkingDirectory=/usr/lib/pasty/
ExecStart=/usr/lib/pasty/pasty
Restart=on-failure
[Install]
WantedBy=multi-user.target

View file

@ -2,8 +2,8 @@
pkgname="dendrite" pkgname="dendrite"
arch="amd64" arch="amd64"
pkgrel=2 pkgrel=1
pkgver="0.13.6" pkgver="0.13.8"
pkgdesc="Dendrite is a second-generation Matrix homeserver written in Go!" pkgdesc="Dendrite is a second-generation Matrix homeserver written in Go!"
url="https://github.com/matrix-org/dendrite" url="https://github.com/matrix-org/dendrite"
maintainer="Leafee98 <me@leafee98.com>" maintainer="Leafee98 <me@leafee98.com>"