1
+ # !/SBUILD ver @v1.0.0
2
+ # SELF: https://raw.githubusercontent.com/pkgforge/soarpkgs/refs/heads/main/binaries/simplex-chat/static.ppkg.stable.yaml
3
+ _disabled : false
4
+
5
+ pkg : " simplex-chat"
6
+ pkg_id : " ppkg.simplex-chat"
7
+ pkg_type : " static"
8
+ category :
9
+ - " ConsoleOnly"
10
+ - " Utility"
11
+ description : " A 100% private-by-design chat platform for the command-line"
12
+ distro_pkg :
13
+ archlinux :
14
+ aur :
15
+ - " simplex-chat-bin"
16
+ - " simplex-chat-git"
17
+ homepage :
18
+ - " https://simplex.chat"
19
+ - " https://github.com/simplex-chat/simplex-chat"
20
+ license :
21
+ - id : " AGPL-3.0"
22
+ url : " https://github.com/simplex-chat/simplex-chat/raw/9cefcb3fe8a934d9d549029c7182c20b5940bead/LICENSE"
23
+ maintainer :
24
+ - " Azathothas (https://github.com/Azathothas)"
25
+ note :
26
+ - " [DO NOT RUN] (Meant for pkgforge CI Only)"
27
+ - " Built Using ppkg. Check/Report @ https://github.com/leleliu008/ppkg-formula-repository-official-core"
28
+ provides :
29
+ - " simplex-chat==simplex-chat-cli"
30
+ repology :
31
+ - " simplex-chat"
32
+ src_url :
33
+ - " https://github.com/simplex-chat/simplex-chat"
34
+ tag :
35
+ - " chat"
36
+ - " privacy"
37
+ x_exec :
38
+ host :
39
+ - " aarch64-Linux"
40
+ - " x86_64-Linux"
41
+ shell : " bash"
42
+ pkgver : |
43
+ curl -qfsSL "https://raw.githubusercontent.com/leleliu008/ppkg-formula-repository-official-core/refs/heads/master/formula/simplex-chat.yml" | grep "src-url:" | sed -E 's/.*v([0-9]+\.[0-9]+\.[0-9]+).*/\1/'
44
+ run : |
45
+ #Build
46
+ docker stop "alpine-builder-mimalloc" >/dev/null 2>&1 ; docker rm "alpine-builder-mimalloc" >/dev/null 2>&1
47
+ docker run --privileged --net="host" --name "alpine-builder-mimalloc" --pull="always" "ghcr.io/pkgforge/alpine-base-mimalloc:stable" \
48
+ sh -c '
49
+ #Setup ENV
50
+ mkdir -p "/build-bins" && cd "$(mktemp -d)" >/dev/null 2>&1
51
+ apk update && apk upgrade --no-interactive 2>/dev/null
52
+ apk del ninja-is-really-ninja --force --no-interactive 2>/dev/null
53
+ apk cache clean --purge
54
+ #CoreUtils
55
+ apk add 7zip binutils coreutils croc curl findutils file git grep jq moreutils rsync tar tree util-linux xz zstd --latest --upgrade --no-interactive 2>/dev/null
56
+ #ppkg
57
+ curl -qfsSL "https://raw.githubusercontent.com/leleliu008/ppkg/master/ppkg" -o "/usr/local/bin/ppkg"
58
+ chmod -v "a+x" "/usr/local/bin/ppkg"
59
+ ppkg setup --syspm
60
+ ppkg update
61
+ #Build: https://github.com/leleliu008/ppkg-formula-repository-official-core/blob/master/formula/simplex-chat.yml
62
+ ppkg install "simplex-chat" --profile="release" -j "$(($(nproc)+1))" --static
63
+ ppkg tree "simplex-chat" --dirsfirst -L 5
64
+ #Copy
65
+ ppkg tree "simplex-chat" --dirsfirst -L 1 | grep -o "/.*/.*" 2>/dev/null | tail -n1 | xargs realpath | xargs -I "{}" rsync -achLv --exclude="*/" "{}/bin/." "/build-bins/."
66
+ #strip & info
67
+ find "/build-bins/" -type f -exec objcopy --remove-section=".comment" --remove-section=".note.*" "{}" \;
68
+ find "/build-bins/" -type f ! -name "*.no_strip" -exec strip --strip-debug --strip-dwo --strip-unneeded "{}" \; >/dev/null 2>&1
69
+ file "/build-bins/"* && du -sh "/build-bins/"*
70
+ '
71
+ #Copy & Meta
72
+ docker cp "alpine-builder-mimalloc:/build-bins/." "${SBUILD_TMPDIR}/"
73
+ [ -s "${SBUILD_TMPDIR}/LICENSE" ] && cp -fv "${SBUILD_TMPDIR}/LICENSE" "${SBUILD_OUTDIR}/LICENSE"
74
+ find "${SBUILD_TMPDIR}" -maxdepth 1 -type f -exec file -i "{}" \; | grep "application/.*executable" | cut -d":" -f1 | xargs realpath | xargs -I "{}" rsync -achvL "{}" "${SBUILD_OUTDIR}"
0 commit comments