add debhelper as package tool, add remark42-bin
All checks were successful
ci/woodpecker/push/build Pipeline was successful
All checks were successful
ci/woodpecker/push/build Pipeline was successful
This commit is contained in:
parent
61194f4f34
commit
f1a4add697
5
debhelper/remark42-bin/debian/changelog
Normal file
5
debhelper/remark42-bin/debian/changelog
Normal 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
|
1
debhelper/remark42-bin/debian/compat
Normal file
1
debhelper/remark42-bin/debian/compat
Normal file
|
@ -0,0 +1 @@
|
||||||
|
12
|
15
debhelper/remark42-bin/debian/control
Normal file
15
debhelper/remark42-bin/debian/control
Normal 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.
|
2
debhelper/remark42-bin/debian/docs
Normal file
2
debhelper/remark42-bin/debian/docs
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
README.md
|
||||||
|
LICENSE
|
2
debhelper/remark42-bin/debian/files
Normal file
2
debhelper/remark42-bin/debian/files
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
remark42-bin_1.13.0_amd64.deb net optional
|
||||||
|
remark42_1.13.0_amd64.buildinfo net optional
|
3
debhelper/remark42-bin/debian/install
Executable file
3
debhelper/remark42-bin/debian/install
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/dh-exec
|
||||||
|
|
||||||
|
remark42.linux-amd64 => /usr/bin/remark42
|
36
debhelper/remark42-bin/debian/preinst
Normal file
36
debhelper/remark42-bin/debian/preinst
Normal 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#
|
||||||
|
|
17
debhelper/remark42-bin/debian/remark42.service
Normal file
17
debhelper/remark42-bin/debian/remark42.service
Normal 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
|
8
debhelper/remark42-bin/debian/rules
Executable file
8
debhelper/remark42-bin/debian/rules
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh "$@"
|
||||||
|
|
||||||
|
override_dh_installsystemd:
|
||||||
|
dh_installsystemd --name remark42 --no-enable --no-start --restart-after-upgrade
|
||||||
|
|
15
debhelper/remark42-bin/prepare.sh
Normal file
15
debhelper/remark42-bin/prepare.sh
Normal 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"
|
Loading…
Reference in a new issue