Skip to content

Commit d336761

Browse files
committed
Add libsagui dependency and automate DEB artifact build
1 parent a0e158c commit d336761

3 files changed

Lines changed: 26 additions & 1 deletion

File tree

.github/workflows/make.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,18 @@ jobs:
3535
run: |
3636
sudo bash -c 'apt-get update; apt-get install -y lazarus' >/dev/null
3737
instantfpc -Fu/usr/lib/lazarus/*/components/lazutils .github/workflows/make.pas
38+
39+
- name: Build DEB package
40+
shell: bash
41+
run: |
42+
sudo apt-get install -y jq >/dev/null
43+
mkdir -p debian/usr/bin
44+
cp -f src/adminhelperd debian/usr/bin/tgadmin
45+
chmod 0755 debian/usr/bin/tgadmin
46+
./build-deb.sh
47+
48+
- name: Upload DEB artifact
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: tgadmin-deb
52+
path: tgadmin_*.deb

build-deb.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,21 @@ validate_config() {
7474
fi
7575
}
7676

77+
validate_binary() {
78+
local binary="${SCRIPT_DIR}/debian/usr/bin/tgadmin"
79+
if [ ! -x "${binary}" ]; then
80+
echo "ERROR: ${binary} is missing or not executable" >&2
81+
echo "Build the daemon and place it at debian/usr/bin/tgadmin before packaging." >&2
82+
exit 1
83+
fi
84+
}
85+
7786
# ---------------------------------------------------------------------------
7887
# Main
7988
# ---------------------------------------------------------------------------
8089
check_deps
8190
validate_config
91+
validate_binary
8292

8393
echo "==> Building ${PACKAGE_NAME} v${app_VER}-${app_VERdeb}"
8494
echo "==> Build dir (Linux fs): ${BUILD_DIR}"

debian/DEBIAN/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Priority: optional
33
Maintainer: Renat Suleymanov <mail@Renat.Su>
44
Architecture: amd64
55
Section: utils
6-
Depends: dash, libc6 (>= 2.2.5)
6+
Depends: dash, libc6 (>= 2.2.5), libsagui2 | libsagui
77
Origin: https://github.com/al-Muhandis/AdminHelper
88
Description: Telegram admin helper
99
Telegram bot service for groups' moderation

0 commit comments

Comments
 (0)