Skip to content

Commit 6542db9

Browse files
authored
Merge pull request #15 from Al-Muhandis/codex/add-sagui-dependency-to-deb-package
Add libsagui runtime dependency and CI DEB packaging step
2 parents a0e158c + 9489c1d commit 6542db9

4 files changed

Lines changed: 27 additions & 3 deletions

File tree

.github/workflows/make.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,17 @@ 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+
chmod 0755 debian/usr/bin/tgadmin
45+
./build-deb.sh
46+
47+
- name: Upload DEB artifact
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: tgadmin-deb
51+
path: tgadmin_*.deb

build-deb.sh

100644100755
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

src/adminhelperd.lpi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
<Version Value="11"/>
111111
<PathDelim Value="\"/>
112112
<Target>
113-
<Filename Value="../deb.staging/usr/bin/tgadmin"/>
113+
<Filename Value="../debian/usr/bin/tgadmin"/>
114114
</Target>
115115
<SearchPaths>
116116
<IncludeFiles Value="$(ProjOutDir)"/>
@@ -287,7 +287,7 @@
287287
<Filename Value="actionadminhelper.pas"/>
288288
<IsPartOfProject Value="True"/>
289289
<IsVisibleTab Value="True"/>
290-
<TopLine Value="258"/>
290+
<TopLine Value="259"/>
291291
<CursorPos X="31" Y="270"/>
292292
<UsageCount Value="257"/>
293293
<Loaded Value="True"/>

0 commit comments

Comments
 (0)