mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-27 03:41:22 +08:00
feat: Add deb release
This commit is contained in:
parent
73fd1bfc1e
commit
a85dc6fc41
6
.github/workflows/build-qv2ray-cmake.yml
vendored
6
.github/workflows/build-qv2ray-cmake.yml
vendored
@ -194,13 +194,17 @@ jobs:
|
|||||||
path: download-artifact
|
path: download-artifact
|
||||||
- name: Pack
|
- name: Pack
|
||||||
run: |
|
run: |
|
||||||
curl -Lo - https://github.com/tcnksm/ghr/releases/download/v0.13.0/ghr_v0.13.0_linux_amd64.tar.gz | tar xzv
|
curl -Lo - https://github.com/tcnksm/ghr/releases/download/v0.16.2/ghr_v0.16.2_linux_amd64.tar.gz | tar xzv
|
||||||
mv ghr*linux_amd64/ghr .
|
mv ghr*linux_amd64/ghr .
|
||||||
source libs/env_deploy.sh
|
source libs/env_deploy.sh
|
||||||
find . -name artifacts.tgz | xargs -n1 tar xvzf
|
find . -name artifacts.tgz | xargs -n1 tar xvzf
|
||||||
cd deployment
|
cd deployment
|
||||||
rm -rf *.pdb
|
rm -rf *.pdb
|
||||||
####
|
####
|
||||||
|
bash ../libs/pack_debian.sh ${{ github.event.inputs.tag }}
|
||||||
|
mv nekoray.deb $version_standalone-debian-x64.deb
|
||||||
|
rm -rf nekoray
|
||||||
|
####
|
||||||
mv linux64 nekoray
|
mv linux64 nekoray
|
||||||
zip -r $version_standalone-linux64.zip nekoray
|
zip -r $version_standalone-linux64.zip nekoray
|
||||||
rm -rf nekoray
|
rm -rf nekoray
|
||||||
|
|||||||
@ -68,7 +68,7 @@ list(APPEND NKR_EXTERNAL_TARGETS ZXing::ZXing)
|
|||||||
|
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
FetchContent_Declare(cpr GIT_REPOSITORY https://github.com/libcpr/cpr.git
|
FetchContent_Declare(cpr GIT_REPOSITORY https://github.com/libcpr/cpr.git
|
||||||
GIT_TAG b5a21decc0cf25773fb5d742101da6b72639aa51) # Replace with your desired git commit from: https://github.com/libcpr/cpr/releases
|
GIT_TAG 3b15fa82ea74739b574d705fea44959b58142eb8) # Replace with your desired git commit from: https://github.com/libcpr/cpr/releases
|
||||||
FetchContent_MakeAvailable(cpr)
|
FetchContent_MakeAvailable(cpr)
|
||||||
list(APPEND NKR_EXTERNAL_TARGETS cpr::cpr)
|
list(APPEND NKR_EXTERNAL_TARGETS cpr::cpr)
|
||||||
|
|
||||||
|
|||||||
46
libs/pack_debian.sh
Normal file
46
libs/pack_debian.sh
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
version="$1"
|
||||||
|
|
||||||
|
mkdir -p nekoray/DEBIAN
|
||||||
|
mkdir -p nekoray/opt
|
||||||
|
cp -r linux64 nekoray/opt/
|
||||||
|
mv nekoray/opt/linux64 nekoray/opt/nekoray
|
||||||
|
rm -rf nekoray/opt/nekoray/usr
|
||||||
|
rm nekoray/opt/nekoray/launcher
|
||||||
|
|
||||||
|
# basic
|
||||||
|
cat >nekoray/DEBIAN/control <<-EOF
|
||||||
|
Package: nekoray
|
||||||
|
Version: $version
|
||||||
|
Architecture: amd64
|
||||||
|
Maintainer: Mahdi Mahdi.zrei@gmail.com
|
||||||
|
Depends: libxcb-util1, libqt6core6, libqt6dbus6, libqt6gui6, libqt6network6, libqt6widgets6, libqt6svg6, libicu72, libxcb-cursor0, desktop-file-utils
|
||||||
|
Description: Qt based cross-platform GUI proxy configuration manager (backend: sing-box)
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat >nekoray/DEBIAN/postinst <<-EOF
|
||||||
|
if [ ! -s /usr/share/applications/nekoray.desktop ]; then
|
||||||
|
cat >/usr/share/applications/nekoray.desktop<<-END
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=nekoray
|
||||||
|
Comment=Qt based cross-platform GUI proxy configuration manager (backend: sing-box)
|
||||||
|
Exec=sh -c "PATH=/opt/nekoray:\$PATH /opt/nekoray/nekobox -appdata"
|
||||||
|
Icon=/opt/nekoray/nekobox.png
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Categories=Network;Application;
|
||||||
|
END
|
||||||
|
fi
|
||||||
|
|
||||||
|
setcap cap_net_admin=ep /opt/nekoray/nekobox_core
|
||||||
|
|
||||||
|
update-desktop-database
|
||||||
|
EOF
|
||||||
|
|
||||||
|
sudo chmod 0755 nekoray/DEBIAN/postinst
|
||||||
|
|
||||||
|
# desktop && PATH
|
||||||
|
|
||||||
|
sudo dpkg-deb -Zxz --build nekoray
|
||||||
Loading…
Reference in New Issue
Block a user