add debhelper as package tool, add remark42-bin
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
leafee98 2024-05-15 15:51:01 +08:00 committed by leafee98
parent 61194f4f34
commit f1a4add697
10 changed files with 104 additions and 0 deletions

View file

@ -0,0 +1,5 @@
remark42 (1.13.0) unstable; urgency=medium
* Initial release. (Closes: #XXXXXX)
-- Leafee98 <me@leafee98.com> Mon, 13 May 2024 20:12:15 +0800

View file

@ -0,0 +1 @@
12

View file

@ -0,0 +1,15 @@
Source: remark42
Section: net
Priority: optional
Maintainer: leafee98 <me@leafee98.com>
Build-Depends: debhelper (>= 10),dh-exec
Package: remark42-bin
Architecture: amd64
Priority: optional
Provides: remark42
Conflicts: remark42
Description: Comment engine
Remark42 is a self-hosted, lightweight and simple (yet functional)
comment engine, which doesn't spy on users. It can be embedded
into blogs, articles, or any other place where readers add comments.

View file

@ -0,0 +1,2 @@
README.md
LICENSE

View file

@ -0,0 +1,2 @@
remark42-bin_1.13.0_amd64.deb net optional
remark42_1.13.0_amd64.buildinfo net optional

View file

@ -0,0 +1,3 @@
#!/usr/bin/dh-exec
remark42.linux-amd64 => /usr/bin/remark42

View file

@ -0,0 +1,36 @@
#!/usr/bin/env bash
case "$1" in
install|upgrade)
if ! getent group | grep -q "^remark42:" ; then
echo -n "Adding group remark42.."
addgroup --quiet --system remark42 2> /dev/null || true
echo "..done"
fi
test -d /var/lib/remark42 || mkdir /var/lib/remark42
if ! getent passwd | grep -q "^remark42:" ; then
echo -n "Adding system user remark42.."
adduser --quiet \
--system \
--ingroup "remark42" \
--no-create-home \
--disabled-password \
remark42 2> /dev/null || true
echo "..done"
fi
usermod --comment "Remark42 (A comment engine)" \
--home "/var/lib/remark42" \
--gid "remark42" \
--shell "/usr/bin/bash" \
remark42
if ! dpkg-statoverride --list "/var/lib/remark42" > /dev/null ; then
chown -R remark42:remark42 /var/lib/remark42
chmod u=rwx,g=rx,o= /var/lib/remark42
fi
;;
esac
#DEBHELPER#

View file

@ -0,0 +1,17 @@
[Unit]
Description=Remark42 - a commenting system
After=network.target
[Service]
User=remark42
Group=remark42
EnvironmentFile=/etc/default/remark42
ExecStart=/usr/bin/remark42 server
Restart=on-failure
RestartSec=5s
LimitNOFILE=1048576
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,8 @@
#!/usr/bin/make -f
%:
dh "$@"
override_dh_installsystemd:
dh_installsystemd --name remark42 --no-enable --no-start --restart-after-upgrade

View file

@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -e
VERSION=1.13.0
ARCHITECTURE=amd64
DOWNLOAD_NAME="remark42.tar"
DOWNLOAD_URL="https://github.com/umputun/remark42/releases/download/v${VERSION}/remark42.linux-${ARCHITECTURE}.tar.gz"
curl --location \
--show-error \
--output "$DOWNLOAD_NAME" \
"$DOWNLOAD_URL"
tar -xf "$DOWNLOAD_NAME"